qse  0.5.0
Public Member Functions | Protected Member Functions | Friends
QseDataDeglitcher Class Reference

#include <qsedatadeglitcher.h>

Inheritance diagram for QseDataDeglitcher:
Inheritance graph

List of all members.

Public Member Functions

 QseDataDeglitcher (QseDataSet *inData, QseDataSet *outData, const QString &name, QObject *parent=0)
void exec ()
- Public Member Functions inherited from QseEXAFSOperator
 QseEXAFSOperator (QseDataSet *inData, QseDataSet *outData, const QString &name, QObject *parent=0)
QseDataSetinputData ()
QseDataSetoutputData ()
bool matchesEnergyPattern (const QseColumn *col, int colnum)
bool matchesEnergyColumn (const QseColumn *col, int colnum)
bool matchesDetectorPattern (const QseColumn *col, int colnum)
bool matchesDetectorColumn (const QseColumn *col, int colnum)
bool matchesNormalizationPattern (const QseColumn *col, int colnum)
bool matchesNormalizationColumn (const QseColumn *col, int colnum)
bool matchesSecondsPattern (const QseColumn *col, int colnum)
bool matchesSecondsColumn (const QseColumn *col, int colnum)
bool matchesCopyPattern (const QseColumn *col, int colnum)
bool matchesCopyColumn (const QseColumn *col, int colnum)
bool matchesCopyNormalizedPattern (const QseColumn *col, int colnum)
bool matchesCopyNormalizedColumn (const QseColumn *col, int colnum)
bool matchesCopyRatePattern (const QseColumn *col, int colnum)
bool matchesCopyRateColumn (const QseColumn *col, int colnum)
bool matchesCopyTotalCountsPattern (const QseColumn *col, int colnum)
bool matchesCopyTotalCountsColumn (const QseColumn *col, int colnum)
- Public Member Functions inherited from QseOperator
 QseOperator (const QString &name, QObject *parent=0)
QString name () const
void setName (const QString &name)
void addParameter (QseParameter *parameter)

Protected Member Functions

void deglitchScan (int n, QseScan *out)

Friends

class QseDataDeglitcherUI

Additional Inherited Members

- Public Types inherited from QseEXAFSOperator
enum  QseScanRole { UnspecifiedScanRole = -1, ScanNotUsedRole, ScanUsedRole }
enum  QseColumnRole {
  UnspecifiedRole = -1, NotUsedRole, DetectorRole, NormalizationRole,
  EnergyRole, SecondsRole, CopyRole, CopyNormalizedRole,
  CopyRateRole, CopyTotalCountsRole
}
- Static Public Member Functions inherited from QseEXAFSOperator
static QColor colorForRole (QseColumnRole r)
static QColor backgroundColorForRole (QseColumnRole r)
- Protected Attributes inherited from QseEXAFSOperator
QseDataSetm_InputData
QseDataSetm_OutputData
QseRegExpParameter m_EnergyPattern
QseRegExpParameter m_DetectorPattern
QseRegExpParameter m_NormalizationPattern
QseRegExpParameter m_SecondsPattern
QseRegExpParameter m_CopyPattern
QseRegExpParameter m_CopyNormalizedPattern
QseRegExpParameter m_CopyRatePattern
QseRegExpParameter m_CopyTotalCountsPattern
QHash< const QseScan
*, QseScanRole
m_ScanExceptions
QHash< const QseColumn
*, QseColumnRole
m_Exceptions

Detailed Description

Definition at line 10 of file qsedatadeglitcher.h.


Constructor & Destructor Documentation

QseDataDeglitcher::QseDataDeglitcher ( QseDataSet inData,
QseDataSet outData,
const QString &  name,
QObject *  parent = 0 
)

Definition at line 6 of file qsedatadeglitcher.cpp.

: QseEXAFSOperator(inData, outData, name, parent)
{
}

Member Function Documentation

void QseDataDeglitcher::deglitchScan ( int  n,
QseScan out 
)
protected

Definition at line 26 of file qsedatadeglitcher.cpp.

Referenced by exec().

{
// QseScan *sc = m_InputData->scan(n);
// if (sc) {
// int nc = sc -> columnCount();
// int energycol = -1;
// for (int c = 0; c < nc; c++) {
// QseColumn *col = sc -> column(c);
// if (matchesEnergyColumn(col)) {
// energycol = c;
// }
// }
// if (energycol < 0) {
// emit message(QString("No energy column found for scan %1").arg(n));
// } else {
// osc -> mergeHeaders(sc->header());
// osc -> setScanNumber(sc->scanNumber());
// QseColumn *energy = osc -> appendColumn("Energy", sc -> column(energycol));
// QseColumn *normal = osc -> appendColumn("Norm");
// QseColumn *detect = osc -> appendColumn("Detector");
// QseColumn *seconds = osc -> appendColumn("Seconds");
// energy -> multiplication(energyScalingRatio());
// int nnorm = 0, ndet = 0, nsecs = 0;
// for (int c = 0; c < nc; c++) {
// QseColumn *col = sc -> column(c);
// if (matchesNormalizationColumn(col)) {
// nnorm += 1;
// normal -> addition(col);
// } else if (matchesDetectorColumn(col)) {
// ndet += 1;
// detect -> addition(col);
// } else if (matchesSecondsColumn(col)) {
// nsecs += 1;
// seconds -> addition(col);
// }
// }
// if (nnorm > 0) {
// QseColumn *ratio = osc -> appendColumn("Ratio", detect);
// ratio -> division(normal);
// emit message(QString("Scan %1 had %2 detector columns, was normalized by %3 ion chambers").arg(n).arg(ndet).arg(nnorm));
// } else if (nsecs > 0) {
// QseColumn *ratio = osc -> appendColumn("Ratio", detect);
// ratio -> division(seconds);
// emit message(QString("Scan %1 had %2 detector columns, was normalized by counting time").arg(n).arg(ndet));
// } else {
// QseColumn *ratio = osc -> appendColumn("Ratio", detect);
// emit message(QString("Scan %1 had %2 detector columns, no normalization performed").arg(n).arg(ndet));
// }
// }
// }
}
void QseDataDeglitcher::exec ( )
virtual

Implements QseOperator.

Definition at line 11 of file qsedatadeglitcher.cpp.

References deglitchScan(), QseEXAFSOperator::m_InputData, and QseEXAFSOperator::m_OutputData.

{
m_OutputData -> clear();
int ns = m_InputData -> scanCount();
for (int s = 0; s < ns; s++) {
QseScan *osc = m_OutputData -> appendScan();
deglitchScan(s, osc);
}
m_OutputData -> emitOperationCompleted();
}

Friends And Related Function Documentation

friend class QseDataDeglitcherUI
friend

Definition at line 20 of file qsedatadeglitcher.h.


The documentation for this class was generated from the following files: