18 #include "secondarydriver.h"
20 #include "pulserdriver.h"
23 #include "nmrspectrumsolver.h"
24 #include "xwavengraph.h"
32 Transaction &tr_meas,
const shared_ptr<XMeasure> &meas);
42 XDriver *emitter)
throw (XRecordError&)
override;
51 XDriver *emitter)
const override;
57 const std::vector<std::complex<double> > &
wave()
const {
return m_wave;}
59 const std::vector<double> &
darkPSD()
const {
return m_darkPSD;}
71 int ftWidth()
const {
return m_ftWave.size();}
74 std::vector<std::complex<double> > m_wave;
75 std::vector<double> m_darkPSD;
77 const std::vector<std::complex<double> > &
ftWave()
const {
return m_ftWave;}
78 double m_ftWavePSDCoeff;
79 std::vector<std::complex<double> > m_ftWave;
80 std::vector<std::complex<double> > m_dsoWave;
81 int m_dsoWaveStartPos, m_waveFTPos, m_waveWidth;
87 std::vector<double> m_darkPSDSum;
94 shared_ptr<FFT> m_ftDark;
96 XTime m_timeClearRequested;
100 const shared_ptr<XScalarEntry> &
entryPeakAbs()
const {
return m_entryPeakAbs;}
102 const shared_ptr<XScalarEntry> &
entryPeakFreq()
const {
return m_entryPeakFreq;}
104 const shared_ptr<XItemNode<XDriverList, XDSO> > &dso()
const {
return m_dso;}
105 const shared_ptr<XItemNode<XDriverList, XPulser> > &pulser()
const {
return m_pulser;}
110 const shared_ptr<XDoubleNode> &
fromTrig()
const {
return m_fromTrig;}
112 const shared_ptr<XDoubleNode> &
width()
const {
return m_width;}
116 const shared_ptr<XBoolNode> &
usePNR()
const {
return m_usePNR;}
118 const shared_ptr<XComboNode> &
pnrSolverList()
const {
return m_pnrSolverList;}
120 const shared_ptr<XComboNode> &
solverList()
const {
return m_solverList;}
122 const shared_ptr<XDoubleNode> &
bgPos()
const {
return m_bgPos;}
124 const shared_ptr<XDoubleNode> &
bgWidth()
const {
return m_bgWidth;}
126 const shared_ptr<XDoubleNode> &
fftPos()
const {
return m_fftPos;}
128 const shared_ptr<XUIntNode> &
fftLen()
const {
return m_fftLen;}
130 const shared_ptr<XComboNode> &
windowFunc()
const {
return m_windowFunc;}
132 const shared_ptr<XDoubleNode> &
windowWidth()
const {
return m_windowWidth;}
134 const shared_ptr<XDoubleNode> &
difFreq()
const {
return m_difFreq;}
137 const shared_ptr<XBoolNode> &
exAvgIncr()
const {
return m_exAvgIncr;}
139 const shared_ptr<XUIntNode> &
extraAvg()
const {
return m_extraAvg;}
141 const shared_ptr<XTouchableNode> &
avgClear()
const {
return m_avgClear;}
144 const shared_ptr<XUIntNode> &
numEcho()
const {
return m_numEcho;}
146 const shared_ptr<XDoubleNode> &
echoPeriod()
const {
return m_echoPeriod;}
150 const shared_ptr<XWaveNGraph> &
waveGraph()
const {
return m_waveGraph;}
152 const shared_ptr<XWaveNGraph> &
ftWaveGraph()
const {
return m_ftWaveGraph;}
154 const shared_ptr<XScalarEntry> m_entryPeakAbs;
155 const shared_ptr<XScalarEntry> m_entryPeakFreq;
157 const shared_ptr<XItemNode<XDriverList, XDSO> > m_dso;
159 const shared_ptr<XDoubleNode> m_fromTrig;
160 const shared_ptr<XDoubleNode> m_width;
163 const shared_ptr<XBoolNode> m_usePNR;
164 const shared_ptr<XComboNode> m_pnrSolverList;
165 const shared_ptr<XComboNode> m_solverList;
166 const shared_ptr<XDoubleNode> m_bgPos;
167 const shared_ptr<XDoubleNode> m_bgWidth;
168 const shared_ptr<XDoubleNode> m_fftPos;
169 const shared_ptr<XUIntNode> m_fftLen;
170 const shared_ptr<XComboNode> m_windowFunc;
171 const shared_ptr<XDoubleNode> m_windowWidth;
172 const shared_ptr<XDoubleNode> m_difFreq;
174 const shared_ptr<XBoolNode> m_exAvgIncr;
175 const shared_ptr<XUIntNode> m_extraAvg;
177 const shared_ptr<XUIntNode> m_numEcho;
178 const shared_ptr<XDoubleNode> m_echoPeriod;
180 const shared_ptr<XTouchableNode> m_spectrumShow;
181 const shared_ptr<XTouchableNode> m_avgClear;
185 const shared_ptr<XItemNode<XDriverList, XPulser> > m_pulser;
188 std::deque<xqcon_ptr> m_conUIs;
190 shared_ptr<XListener> m_lsnOnSpectrumShow, m_lsnOnAvgClear;
191 shared_ptr<XListener> m_lsnOnCondChanged;
194 const shared_ptr<XStatusPrinter> m_statusPrinter;
197 const shared_ptr<XWaveNGraph> m_waveGraph;
198 const shared_ptr<XWaveNGraph> m_ftWaveGraph;
201 shared_ptr<SpectrumSolverWrapper> m_solver;
202 shared_ptr<SpectrumSolverWrapper> m_solverPNR;
203 shared_ptr<XXYPlot> m_peakPlot;
210 std::vector<std::complex<double> > &wave,
int pos,
int length,
int bgpos,
int bglength);
212 void rotNFFT(
Transaction &tr,
int ftpos,
double ph,
213 std::vector<std::complex<double> > &wave, std::vector<std::complex<double> > &ftwave);