qse
0.5.4
Main Page
Related Pages
Classes
Files
File List
File Members
qse
qsedatadeglitcher.cpp
Go to the documentation of this file.
1
#include "
qsedatadeglitcher.h
"
2
#include "
qsedataset.h
"
3
#include "
qsescan.h
"
4
5
QseDataDeglitcher::QseDataDeglitcher
6
(
QseDataSet
* inData,
QseDataSet
* outData,
const
QString& name, QObject* parent)
7
:
QseEXAFSOperator
(inData, outData, name, parent)
8
{
9
}
10
11
void
QseDataDeglitcher::exec
()
12
{
13
m_OutputData
-> clear();
14
15
int
ns =
m_InputData
-> scanCount();
16
17
for
(
int
s = 0; s < ns; s++) {
18
QseScan
*osc =
m_OutputData
-> appendScan();
19
20
deglitchScan
(s, osc);
21
}
22
23
m_OutputData
-> emitOperationCompleted();
24
}
25
26
void
QseDataDeglitcher::deglitchScan
(
int
n,
QseScan
* osc)
27
{
28
// QseScan *sc = m_InputData->scan(n);
29
30
// if (sc) {
31
// int nc = sc -> columnCount();
32
// int energycol = -1;
33
34
// for (int c = 0; c < nc; c++) {
35
// QseColumn *col = sc -> column(c);
36
37
// if (matchesEnergyColumn(col)) {
38
// energycol = c;
39
// }
40
// }
41
42
// if (energycol < 0) {
43
// emit message(QString("No energy column found for scan %1").arg(n));
44
// } else {
45
// osc -> mergeHeaders(sc->header());
46
// osc -> setScanNumber(sc->scanNumber());
47
48
// QseColumn *energy = osc -> appendColumn("Energy", sc -> column(energycol));
49
// QseColumn *normal = osc -> appendColumn("Norm");
50
// QseColumn *detect = osc -> appendColumn("Detector");
51
// QseColumn *seconds = osc -> appendColumn("Seconds");
52
53
// energy -> multiplication(energyScalingRatio());
54
55
// int nnorm = 0, ndet = 0, nsecs = 0;
56
57
// for (int c = 0; c < nc; c++) {
58
// QseColumn *col = sc -> column(c);
59
60
// if (matchesNormalizationColumn(col)) {
61
// nnorm += 1;
62
// normal -> addition(col);
63
// } else if (matchesDetectorColumn(col)) {
64
// ndet += 1;
65
// detect -> addition(col);
66
// } else if (matchesSecondsColumn(col)) {
67
// nsecs += 1;
68
// seconds -> addition(col);
69
// }
70
// }
71
72
// if (nnorm > 0) {
73
// QseColumn *ratio = osc -> appendColumn("Ratio", detect);
74
75
// ratio -> division(normal);
76
77
// emit message(QString("Scan %1 had %2 detector columns, was normalized by %3 ion chambers").arg(n).arg(ndet).arg(nnorm));
78
// } else if (nsecs > 0) {
79
// QseColumn *ratio = osc -> appendColumn("Ratio", detect);
80
81
// ratio -> division(seconds);
82
// emit message(QString("Scan %1 had %2 detector columns, was normalized by counting time").arg(n).arg(ndet));
83
// } else {
84
// QseColumn *ratio = osc -> appendColumn("Ratio", detect);
85
86
// emit message(QString("Scan %1 had %2 detector columns, no normalization performed").arg(n).arg(ndet));
87
// }
88
// }
89
// }
90
}
qsedataset.h
qsedatadeglitcher.h
QseDataDeglitcher::QseDataDeglitcher
QseDataDeglitcher(QseDataSet *inData, QseDataSet *outData, const QString &name, QObject *parent=0)
Definition:
qsedatadeglitcher.cpp:6
QseScan
Definition:
qsescan.h:15
QseDataDeglitcher::deglitchScan
void deglitchScan(int n, QseScan *out)
Definition:
qsedatadeglitcher.cpp:26
QseDataSet
Definition:
qsedataset.h:14
qsescan.h
QseEXAFSOperator::m_InputData
QseDataSet * m_InputData
Definition:
qseexafsoperator.h:67
QseEXAFSOperator
Definition:
qseexafsoperator.h:13
QseDataDeglitcher::exec
void exec()
Definition:
qsedatadeglitcher.cpp:11
QseEXAFSOperator::m_OutputData
QseDataSet * m_OutputData
Definition:
qseexafsoperator.h:68
Generated by
1.8.6