17 #include "secondarydriver.h"
18 #include "xnodeconnector.h"
24 #include "nmrspectrumsolver.h"
33 #include "xwavengraph.h"
41 XNMRT1(
const char *name,
bool runtime,
42 Transaction &tr_meas,
const shared_ptr<XMeasure> &meas);
50 XDriver *emitter)
throw (XRecordError&);
69 std::complex<double>
c;
75 std::vector<std::complex<double> > wave;
77 FFT::twindowfunc windowfunc;
84 std::deque<std::complex<double> > value_by_cond;
87 std::deque<shared_ptr<ConvolutionCache> > m_convolutionCache;
95 XTime m_timeClearRequested;
100 const shared_ptr<XScalarEntry> &t1invErr()
const {
return m_t1invErr;}
102 const shared_ptr<XItemNode < XDriverList, XPulser > > &pulser()
const {
return m_pulser;}
103 const shared_ptr<XItemNode < XDriverList, XNMRPulseAnalyzer > > &pulse1()
const {
return m_pulse1;}
104 const shared_ptr<XItemNode < XDriverList, XNMRPulseAnalyzer > > &pulse2()
const {
return m_pulse2;}
107 const shared_ptr<XBoolNode> &
active()
const {
return m_active;}
109 const shared_ptr<XBoolNode> &
autoPhase()
const {
return m_autoPhase;}
111 const shared_ptr<XBoolNode> &
mInftyFit()
const {
return m_mInftyFit;}
113 const shared_ptr<XBoolNode> &
absFit()
const {
return m_absFit;}
115 const shared_ptr<XBoolNode> &
trackPeak()
const {
return m_trackPeak;}
117 const shared_ptr<XDoubleNode> &
p1Min()
const {
return m_p1Min;}
118 const shared_ptr<XDoubleNode> &p1Max()
const {
return m_p1Max;}
120 const shared_ptr<XDoubleNode> &
p1Next()
const {
return m_p1Next;}
121 const shared_ptr<XDoubleNode> &p1AltNext()
const {
return m_p1AltNext;}
123 const shared_ptr<XDoubleNode> &
phase()
const {
return m_phase;}
125 const shared_ptr<XDoubleNode> &
freq()
const {
return m_freq;}
127 const shared_ptr<XComboNode> &
windowFunc()
const {
return m_windowFunc;}
129 const shared_ptr<XComboNode> &
windowWidth()
const {
return m_windowWidth;}
131 const shared_ptr<XBoolNode> &
autoWindow()
const {
return m_autoWindow;}
132 enum MEASMODE {MEAS_T1 = 0, MEAS_T2 = 1, MEAS_ST_E = 2};
134 const shared_ptr<XComboNode> &
mode()
const {
return m_mode;}
136 const shared_ptr<XUIntNode> &
smoothSamples()
const {
return m_smoothSamples;}
138 const shared_ptr<XComboNode> &
p1Strategy()
const {
return m_p1Strategy;}
140 const shared_ptr<XComboNode> &
p1Dist()
const {
return m_p1Dist;}
142 const shared_ptr<XItemNode < XRelaxFuncList, XRelaxFunc > > &
relaxFunc()
const {
return m_relaxFunc;}
153 const shared_ptr<XScalarEntry> m_t1invErr;
155 const shared_ptr<XItemNode < XDriverList, XPulser > > m_pulser;
156 const shared_ptr<XItemNode < XDriverList, XNMRPulseAnalyzer > > m_pulse1;
157 const shared_ptr<XItemNode < XDriverList, XNMRPulseAnalyzer > > m_pulse2;
159 const shared_ptr<XBoolNode> m_active;
160 const shared_ptr<XBoolNode> m_autoPhase;
161 const shared_ptr<XBoolNode> m_mInftyFit;
162 const shared_ptr<XBoolNode> m_absFit;
163 const shared_ptr<XBoolNode> m_trackPeak;
164 const shared_ptr<XDoubleNode> m_p1Min;
165 const shared_ptr<XDoubleNode> m_p1Max;
166 const shared_ptr<XDoubleNode> m_p1Next;
167 const shared_ptr<XDoubleNode> m_p1AltNext;
168 const shared_ptr<XDoubleNode> m_phase;
169 const shared_ptr<XDoubleNode> m_freq;
170 const shared_ptr<XDoubleNode> m_bandWidth;
171 const shared_ptr<XComboNode> m_windowFunc;
172 const shared_ptr<XComboNode> m_windowWidth;
173 const shared_ptr<XBoolNode> m_autoWindow;
174 const shared_ptr<XComboNode> m_mode;
175 const shared_ptr<XUIntNode> m_smoothSamples;
176 const shared_ptr<XComboNode> m_p1Strategy;
177 const shared_ptr<XComboNode> m_p1Dist;
178 shared_ptr<XItemNode < XRelaxFuncList, XRelaxFunc > > m_relaxFunc;
179 const shared_ptr<XTouchableNode> m_resetFit, m_clearAll;
180 const shared_ptr<XStringNode> m_fitStatus;
184 std::vector<Payload::Pt> *pts;
185 shared_ptr<XRelaxFunc> func;
190 shared_ptr<XListener> m_lsnOnClearAll, m_lsnOnResetFit;
191 shared_ptr<XListener> m_lsnOnActiveChanged;
192 shared_ptr<XListener> m_lsnOnCondChanged, m_lsnOnP1CondChanged;
198 std::deque<xqcon_ptr> m_conUIs;
201 const std::vector< std::complex<double> >&wave,
int origin,
double cf,
202 std::deque<std::complex<double> > &value_by_cond);
204 shared_ptr<SpectrumSolverWrapper> m_solver;
207 const shared_ptr<XStatusPrinter> m_statusPrinter;
219 std::deque<double> m_windowWidthList;
223 const static int CONVOLUTION_CACHE_SIZE = (3 * 10);
225 const static char P1DIST_LINEAR[];
226 const static char P1DIST_LOG[];
227 const static char P1DIST_RECIPROCAL[];
229 const static char P1STRATEGY_RANDOM[];
230 const static char P1STRATEGY_FLATTEN[];
232 double distributeP1(
const Snapshot &shot,
double uniform_x_0_to_1);
234 void setNextP1(
const Snapshot &shot);