Base class of NMR Pulsers. More...
#include <pulserdriver.h>
Classes | |
struct | Payload |
Public Types | |
enum | { N_MODE_NMR_PULSER = 0, N_MODE_PULSE_ANALYZER = 1 } |
driver specific part below More... | |
enum | { N_COMB_MODE_OFF = 0, N_COMB_MODE_ON = 1, N_COMB_MODE_P1_ALT = 2, N_COMB_MODE_COMB_ALT = 3 } |
enum | { N_RT_MODE_FIXREP = 0, N_RT_MODE_FIXREST = 1 } |
enum | { MAX_NUM_PHASE_CYCLE = 16 } |
enum | { NUM_DO_PORTS = 16 } |
of digital-pulse ports. | |
enum | { PAT_DO_MASK = (1 << NUM_DO_PORTS) - 1, PAT_QAM_PHASE = (1 << NUM_DO_PORTS), PAT_QAM_PHASE_MASK = PAT_QAM_PHASE * 3, PAT_QAM_PULSE_IDX = PAT_QAM_PHASE * 4, PAT_QAM_PULSE_IDX_P1 = PAT_QAM_PULSE_IDX * 1, PAT_QAM_PULSE_IDX_P2 = PAT_QAM_PULSE_IDX * 2, PAT_QAM_PULSE_IDX_PCOMB = PAT_QAM_PULSE_IDX * 3, PAT_QAM_PULSE_IDX_INDUCE_EMISSION = PAT_QAM_PULSE_IDX * 4, PAT_QAM_PULSE_IDX_MASK = PAT_QAM_PULSE_IDX * 15, PAT_QAM_MASK = PAT_QAM_PHASE_MASK | PAT_QAM_PULSE_IDX_MASK } |
for RelPatList patterns. More... | |
Public Member Functions | |
XPulser (const char *name, bool runtime, Transaction &tr_meas, const shared_ptr< XMeasure > &meas) | |
virtual void | showForms () |
shows all forms belonging to driver | |
const shared_ptr< XBoolNode > & | output () const |
const shared_ptr< XComboNode > & | combMode () const |
const shared_ptr< XComboNode > & | rtMode () const |
const shared_ptr< XComboNode > & | numPhaseCycle () const |
How many cycles in phase cycling. | |
const shared_ptr< XDoubleNode > & | rtime () const |
Repetition/Rest Time [ms]. | |
const shared_ptr< XDoubleNode > & | tau () const |
[us] | |
const shared_ptr< XDoubleNode > & | combPW () const |
PulseWidths [us]. | |
const shared_ptr< XDoubleNode > & | pw1 () const |
PulseWidths [us]. | |
const shared_ptr< XDoubleNode > & | pw2 () const |
PulseWidths [us]. | |
const shared_ptr< XDoubleNode > & | combPT () const |
Comb pulse periodic term [us]. | |
const shared_ptr< XDoubleNode > & | combP1 () const |
P1 and P1 alternative. | |
const shared_ptr< XDoubleNode > & | combP1Alt () const |
P1 and P1 alternative. | |
const shared_ptr< XDoubleNode > & | aswSetup () const |
Analog switch setting, setup(proceeding) time before the first spin echo. | |
const shared_ptr< XDoubleNode > & | aswHold () const |
Analog switch setting, hold time after the last spin echo. | |
const shared_ptr< XDoubleNode > & | altSep () const |
Separation time in DSO record, cause a shift of trigger of DSO in alternatively mode. | |
const shared_ptr< XDoubleNode > & | g2Setup () const |
Setup time of pre-gating port and QPSK. | |
const shared_ptr< XUIntNode > & | combNum () const |
of comb pulses | |
const shared_ptr< XUIntNode > & | echoNum () const |
of Spin echoes (i.e. pi pulses) | |
const shared_ptr< XBoolNode > & | drivenEquilibrium () const |
polarize spins after pulse sequence or not | |
const shared_ptr< XDoubleNode > & | combOffRes () const |
off-resonance comb pulses | |
const shared_ptr< XComboNode > & | combFunc () const |
Pulse Modulation. | |
const shared_ptr< XComboNode > & | p1Func () const |
Pulse Modulation. | |
const shared_ptr< XComboNode > & | p2Func () const |
Pulse Modulation. | |
const shared_ptr< XDoubleNode > & | combLevel () const |
[dB], Pulse Modulation | |
const shared_ptr< XDoubleNode > & | p1Level () const |
[dB], Pulse Modulation | |
const shared_ptr< XDoubleNode > & | p2Level () const |
[dB], Pulse Modulation | |
const shared_ptr< XDoubleNode > & | masterLevel () const |
[dB] | |
const shared_ptr< XBoolNode > & | induceEmission () const |
const shared_ptr< XDoubleNode > & | induceEmissionPhase () const |
const shared_ptr< XDoubleNode > & | qamOffset1 () const |
const shared_ptr< XDoubleNode > & | qamOffset2 () const |
[F.S.] | |
const shared_ptr< XDoubleNode > & | qamLevel1 () const |
const shared_ptr< XDoubleNode > & | qamLevel2 () const |
< Quadrature Amplitude Modulation. Amplitude compensation factor. | |
const shared_ptr< XDoubleNode > & | qamDelay1 () const |
const shared_ptr< XDoubleNode > & | qamDelay2 () const |
< Delaying compensation [us]. | |
const shared_ptr< XDoubleNode > & | difFreq () const |
[MHz] | |
const shared_ptr< XDoubleNode > & | qswDelay () const |
Q-switch setting, period after the end-edge of pulses [us]. | |
const shared_ptr< XDoubleNode > & | qswWidth () const |
Q-switch setting, width of suppression [us]. | |
const shared_ptr< XDoubleNode > & | qswSoftSWOff () const |
Q-switch setting, second pulse [us]. | |
const shared_ptr< XBoolNode > & | qswPiPulseOnly () const |
Q-switch setting, use QSW only for pi pulses. | |
const shared_ptr< XBoolNode > & | invertPhase () const |
const shared_ptr< XBoolNode > & | conserveStEPhase () const |
const shared_ptr< XComboNode > & | portSel (unsigned int port) const |
const shared_ptr< XBoolNode > & | pulseAnalyzerMode () const |
const shared_ptr< XDoubleNode > & | paPulseRept () const |
const shared_ptr< XDoubleNode > & | paPulseBW () const |
const shared_ptr< XUIntNode > & | firstPhase () const |
0-3, selects the first phase of QPSK. | |
virtual double | resolution () const =0 |
time resolution [ms] | |
Public Member Functions inherited from XPrimaryDriver | |
XPrimaryDriver (const char *name, bool runtime, Transaction &tr_meas, const shared_ptr< XMeasure > &meas) | |
Public Member Functions inherited from XDriver | |
XDriver (const char *name, bool runtime, Transaction &tr_meas, const shared_ptr< XMeasure > &meas) | |
Public Member Functions inherited from XNode | |
XNode (const char *name, bool runtime=false) | |
template<class T > | |
shared_ptr< T > | create (const char *name) |
template<class T , typename... Args> | |
shared_ptr< T > | create (const char *name, bool runtime, Args &&...args) |
template<class T > | |
shared_ptr< T > | create (Transaction &tr, const char *name) |
template<class T , typename... Args> | |
shared_ptr< T > | create (Transaction &tr, const char *name, bool runtime, Args &&...args) |
XString | getName () const |
virtual XString | getLabel () const |
XString | getTypename () const |
shared_ptr< XNode > | getChild (const XString &var) const |
shared_ptr< XNode > | getParent () const |
void | setUIEnabled (bool v) |
Enables/disables controls over scripting/GUI. | |
void | disable () |
Disables all scripting/GUI operations on this node hereafter. | |
Public Member Functions inherited from Transactional::Node< XNode > | |
bool | insert (Transaction< XNode > &tr, const shared_ptr< XNode > &var, bool online_after_insertion=false) |
void | insert (const shared_ptr< XNode > &var) |
bool | release (Transaction< XNode > &tr, const shared_ptr< XNode > &var) |
void | release (const shared_ptr< XNode > &var) |
void | releaseAll () |
bool | swap (Transaction< XNode > &tr, const shared_ptr< XNode > &x, const shared_ptr< XNode > &y) |
void | swap (const shared_ptr< XNode > &x, const shared_ptr< XNode > &y) |
XNode * | upperNode (Snapshot< XNode > &shot) |
Finds the parent node in shot. | |
Snapshot< XNode > | iterate_commit (Closure) |
Snapshot< XNode > | iterate_commit_if (Closure) |
void | iterate_commit_while (Closure) |
void | print_ () const |
Node (const Node &)=delete | |
Node & | operator= (const Node &)=delete |
Protected Member Functions | |
unsigned int | selectedPorts (const Snapshot &shot, int func) const |
virtual void | start () |
Starts up your threads, connects GUI, and activates signals. | |
virtual void | stop () |
virtual void | analyzeRaw (RawDataReader &reader, Transaction &tr) throw (XRecordError&) |
virtual void | visualize (const Snapshot &shot) |
tpulsefunc | pulseFunc (int func_no) const |
int | pulseFuncNo (const XString &str) const |
virtual void | changeOutput (const Snapshot &shot, bool output, unsigned int blankpattern)=0 |
Sends patterns to pulser or turns off. | |
virtual void | createNativePatterns (Transaction &tr)=0 |
Converts RelPatList to native patterns. | |
virtual double | resolutionQAM () const =0 |
virtual double | minPulseWidth () const =0 |
minimum period of pulses [ms] | |
virtual bool | hasQAMPorts () const =0 |
existence of AO ports. | |
Protected Member Functions inherited from XPrimaryDriver | |
virtual void | closeInterface ()=0 |
void | finishWritingRaw (const shared_ptr< const RawData > &rawdata, const XTime &time_awared, const XTime &time_recorded) |
Protected Member Functions inherited from XDriver | |
void | record (Transaction &tr, const XTime &time_awared, const XTime &time_recorded) |
Private Member Functions | |
void | onMoreConfigShow (const Snapshot &shot, XTouchableNode *) |
void | onPulseChanged (const Snapshot &shot, XValueNodeBase *node) |
void | createRelPatListNMRPulser (Transaction &tr) throw (XRecordError&) |
creates RelPatList | |
void | createRelPatListPulseAnalyzer (Transaction &tr) throw (XRecordError&) |
unsigned int | bitpatternsOfQPSK (const Snapshot &shot, unsigned int qpsk[4], unsigned int qpskinv[4], bool invert) |
void | makeWaveForm (Transaction &tr, unsigned int pnum_minus_1, double pw, unsigned int to_center, tpulsefunc func, double dB, double freq=0.0, double phase=0.0) |
prepares waveforms for QAM. | |
double | rintTermMilliSec (double msec) const |
truncates time by resolution(). | |
double | rintTermMicroSec (double usec) const |
uint64_t | ceilSampsMicroSec (double us) const |
uint64_t | rintSampsMicroSec (double us) const |
uint64_t | rintSampsMilliSec (double ms) const |
void | changeUIStatus (bool nmrmode, bool state) |
Private Attributes | |
const shared_ptr< XBoolNode > | m_output |
const shared_ptr< XComboNode > | m_combMode |
const shared_ptr< XComboNode > | m_rtMode |
const shared_ptr< XDoubleNode > | m_rt |
Repetition/Rest Time [ms]. | |
const shared_ptr< XDoubleNode > | m_tau |
[us] | |
const shared_ptr< XDoubleNode > | m_combPW |
const shared_ptr< XDoubleNode > | m_pw1 |
const shared_ptr< XDoubleNode > | m_pw2 |
PulseWidths [us]. | |
const shared_ptr< XUIntNode > | m_combNum |
of comb pulses | |
const shared_ptr< XDoubleNode > | m_combPT |
Comb pulse periodic term [us]. | |
const shared_ptr< XDoubleNode > | m_combP1 |
const shared_ptr< XDoubleNode > | m_combP1Alt |
P1 and P1 alternative. | |
const shared_ptr< XDoubleNode > | m_aswSetup |
Analog switch setting, setup(proceeding) time before the first spin echo. | |
const shared_ptr< XDoubleNode > | m_aswHold |
Analog switch setting, hold time after the last spin echo. | |
const shared_ptr< XDoubleNode > | m_altSep |
Separation time in DSO record, cause a shift of trigger of DSO in alternatively mode. | |
const shared_ptr< XDoubleNode > | m_g2Setup |
Setup time of pre-gating port and QPSK. | |
const shared_ptr< XUIntNode > | m_echoNum |
of Spin echoes (i.e. pi pulses) | |
const shared_ptr< XDoubleNode > | m_combOffRes |
off-resonance comb pulses | |
const shared_ptr< XBoolNode > | m_drivenEquilibrium |
polarize spins after pulse sequence or not | |
const shared_ptr< XComboNode > | m_numPhaseCycle |
How many cycles in phase cycling. | |
const shared_ptr< XComboNode > | m_p1Func |
const shared_ptr< XComboNode > | m_p2Func |
const shared_ptr< XComboNode > | m_combFunc |
Pulse Modulation. | |
const shared_ptr< XDoubleNode > | m_p1Level |
const shared_ptr< XDoubleNode > | m_p2Level |
const shared_ptr< XDoubleNode > | m_combLevel |
[dB], Pulse Modulation | |
const shared_ptr< XDoubleNode > | m_masterLevel |
[dB] | |
const shared_ptr< XDoubleNode > | m_qamOffset1 |
const shared_ptr< XDoubleNode > | m_qamOffset2 |
[F.S.] | |
const shared_ptr< XDoubleNode > | m_qamLevel1 |
const shared_ptr< XDoubleNode > | m_qamLevel2 |
const shared_ptr< XDoubleNode > | m_qamDelay1 |
const shared_ptr< XDoubleNode > | m_qamDelay2 |
[us] | |
const shared_ptr< XDoubleNode > | m_difFreq |
[MHz] | |
const shared_ptr< XBoolNode > | m_induceEmission |
const shared_ptr< XDoubleNode > | m_induceEmissionPhase |
const shared_ptr< XDoubleNode > | m_qswDelay |
const shared_ptr< XDoubleNode > | m_qswWidth |
const shared_ptr< XDoubleNode > | m_qswSoftSWOff |
const shared_ptr< XBoolNode > | m_invertPhase |
const shared_ptr< XBoolNode > | m_conserveStEPhase |
const shared_ptr< XBoolNode > | m_qswPiPulseOnly |
shared_ptr< XComboNode > | m_portSel [NUM_DO_PORTS] |
const shared_ptr< XBoolNode > | m_pulseAnalyzerMode |
const shared_ptr< XDoubleNode > | m_paPulseRept |
[ms] | |
const shared_ptr< XDoubleNode > | m_paPulseBW |
[kHz] | |
const shared_ptr< XUIntNode > | m_firstPhase |
0-3, selects QPSK for the first cycle. | |
const shared_ptr< XTouchableNode > | m_moreConfigShow |
std::deque< xqcon_ptr > | m_conUIs |
shared_ptr< XListener > | m_lsnOnPulseChanged |
shared_ptr< XListener > | m_lsnOnMoreConfigShow |
const qshared_ptr< FrmPulser > | m_form |
const qshared_ptr< FrmPulserMore > | m_formMore |
xqcon_ptr | m_conPulserDriver |
Additional Inherited Members | |
Static Public Member Functions inherited from XNode | |
template<class T__ > | |
static shared_ptr< T__ > | createOrphan (const char *name) |
template<class T__ , typename... Args_> | |
static shared_ptr< T__ > | createOrphan (const char *name, bool runtime, Args_ &&...args) |
Base class of NMR Pulsers.
Definition at line 33 of file pulserdriver.h.
anonymous enum |
driver specific part below
Definition at line 45 of file pulserdriver.h.
anonymous enum |
Definition at line 47 of file pulserdriver.h.
anonymous enum |
Definition at line 49 of file pulserdriver.h.
anonymous enum |
Definition at line 51 of file pulserdriver.h.
anonymous enum |
|
protectedvirtual |
This function will be called when raw data are written. Implement this function to convert the raw data to the record (Payload).
Implements XPrimaryDriver.
Definition at line 422 of file pulserdriver.cpp.
|
private |
Definition at line 1032 of file pulserdriver.cpp.
References selectedPorts().
Referenced by createRelPatListNMRPulser().
|
inline |
see above definitions in header file
Definition at line 165 of file pulserdriver.h.
References m_combMode.
Referenced by start().
|
inline |
< Delaying compensation [us].
[us]
Definition at line 200 of file pulserdriver.h.
References m_qamDelay2.
Referenced by makeWaveForm(), and start().
|
inline |
Control period to next pulse sequence Fix Repetition Time or Fix Rest Time which means time between pulse sequences
Definition at line 168 of file pulserdriver.h.
References m_rtMode.
|
protected |
func | e.g. PORTSEL_GATE. |
Definition at line 629 of file pulserdriver.cpp.
Referenced by bitpatternsOfQPSK(), createRelPatListNMRPulser(), and visualize().
|
protectedvirtual |
Shuts down your threads, unconnects GUI, and deactivates signals This function may be called even if driver has already stopped.
Implements XPrimaryDriver.
Definition at line 359 of file pulserdriver.cpp.
References XPrimaryDriver::closeInterface().
|
protectedvirtual |
This function is called inside analyze() or analyzeRaw() This might be called even if the record is broken (time() == false).
Implements XDriver.
Definition at line 1153 of file pulserdriver.cpp.
References changeOutput(), XNode::getLabel(), and selectedPorts().
|
private |
see above definitions in header file
Definition at line 264 of file pulserdriver.h.
Referenced by combMode().
|
private |
Control period to next pulse sequence Fix Repetition Time or Fix Rest Time which means time between pulse sequences
Definition at line 267 of file pulserdriver.h.
Referenced by rtMode().