14 #ifndef nmrspectrumbaseH
15 #define nmrspectrumbaseH
17 #include <secondarydriver.h>
18 #include <xnodeconnector.h>
20 #include "nmrspectrumsolver.h"
30 Transaction &tr_meas,
const shared_ptr<XMeasure> &meas);
39 XDriver *emitter)
throw (XRecordError&)
override;
48 XDriver *emitter)
const override;
52 const std::vector<std::complex<double> > &wave()
const {
return m_wave;}
54 const std::vector<double> &
weights()
const {
return m_weights;}
56 const std::vector<double> &
darkPSD()
const {
return m_darkPSD;}
58 double res()
const {
return m_res;}
60 double min()
const {
return m_min;}
67 std::vector<double> m_weights;
68 std::vector<double> m_darkPSD;
69 std::vector<std::complex<double> > m_wave;
71 enum {ACCUM_BANKS = 3};
72 std::deque<std::complex<double> > m_accum[ACCUM_BANKS];
73 std::deque<double> m_accum_weights[ACCUM_BANKS];
74 std::deque<double> m_accum_dark[ACCUM_BANKS];
76 std::deque<std::pair<double, double> > m_peaks;
78 shared_ptr<FFT> m_ift, m_preFFT;
80 XTime m_timeClearRequested;
83 const shared_ptr<XItemNode<XDriverList, XNMRPulseAnalyzer> > &pulse()
const {
return m_pulse;}
85 const shared_ptr<XDoubleNode> &bandWidth()
const {
return m_bandWidth;}
87 const shared_ptr<XComboNode> &
bwList()
const {
return m_bwList;}
89 const shared_ptr<XBoolNode> &
autoPhase()
const {
return m_autoPhase;}
91 const shared_ptr<XDoubleNode> &
phase()
const {
return m_phase;}
93 const shared_ptr<XComboNode> &
solverList()
const {
return m_solverList;}
95 const shared_ptr<XComboNode> &
windowFunc()
const {
return m_windowFunc;}
97 const shared_ptr<XDoubleNode> &
windowWidth()
const {
return m_windowWidth;}
99 const shared_ptr<XTouchableNode> &
clear()
const {
return m_clear;}
101 shared_ptr<XListener> m_lsnOnClear, m_lsnOnCondChanged;
113 virtual void rearrangeInstrum(
const Snapshot &) {}
114 virtual void getValues(
const Snapshot &shot_this, std::vector<double> &values)
const = 0;
115 virtual bool checkDependencyImpl(
const Snapshot &shot_this,
123 const shared_ptr<XItemNode<XDriverList, XNMRPulseAnalyzer> > m_pulse;
125 const shared_ptr<XDoubleNode> m_bandWidth;
126 const shared_ptr<XComboNode> m_bwList;
127 const shared_ptr<XBoolNode> m_autoPhase;
128 const shared_ptr<XDoubleNode> m_phase;
129 const shared_ptr<XTouchableNode> m_clear;
130 const shared_ptr<XComboNode> m_solverList;
131 const shared_ptr<XComboNode> m_windowFunc;
132 const shared_ptr<XDoubleNode> m_windowWidth;
134 std::deque<xqcon_ptr> m_conBaseUIs;
136 shared_ptr<SpectrumSolverWrapper> m_solver;
137 shared_ptr<XXYPlot> m_peakPlot;
144 const shared_ptr<XStatusPrinter> m_statusPrinter;
145 const shared_ptr<XWaveNGraph> m_spectrum;