Classes | Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
XNMRT1 Class Reference

Measure Relaxation Curve. More...

#include <nmrrelax.h>

Inheritance diagram for XNMRT1:
Inheritance graph
[legend]

Classes

struct  NLLS
 for Non-Lenear-Least-Square fitting More...
 
struct  Payload
 

Public Types

enum  MEASMODE { MEAS_T1 = 0, MEAS_T2 = 1, MEAS_ST_E = 2 }
 

Public Member Functions

 XNMRT1 (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< XScalarEntry > & t1inv () const
 Holds 1/T1 or 1/T2 and its std. deviation.
 
const shared_ptr< XScalarEntry > & t1invErr () const
 
const shared_ptr< XItemNode
< XDriverList, XPulser > > & 
pulser () const
 
const shared_ptr< XItemNode
< XDriverList,
XNMRPulseAnalyzer > > & 
pulse1 () const
 
const shared_ptr< XItemNode
< XDriverList,
XNMRPulseAnalyzer > > & 
pulse2 () const
 
const shared_ptr< XBoolNode > & active () const
 If active, a control to Pulser is allowed.
 
const shared_ptr< XBoolNode > & autoPhase () const
 Deduce phase from data.
 
const shared_ptr< XBoolNode > & mInftyFit () const
 Fit 3 parameters.
 
const shared_ptr< XBoolNode > & absFit () const
 Use absolute value, ignoring phase.
 
const shared_ptr< XBoolNode > & trackPeak () const
 Tracks peak freq. to accomodate a field decay.
 
const shared_ptr< XDoubleNode > & p1Min () const
 Region of P1 or 2tau for fitting, display, control of pulser [ms].
 
const shared_ptr< XDoubleNode > & p1Max () const
 
const shared_ptr< XDoubleNode > & p1Next () const
 Candidate for the next P1/2tau.
 
const shared_ptr< XDoubleNode > & p1AltNext () const
 
const shared_ptr< XDoubleNode > & phase () const
 (Deduced) phase of echoes [deg.]
 
const shared_ptr< XDoubleNode > & freq () const
 Center freq of echoes [kHz].
 
const shared_ptr< XComboNode > & windowFunc () const
 FFT Window Function.
 
const shared_ptr< XComboNode > & windowWidth () const
 FFT Window Length.
 
const shared_ptr< XBoolNode > & autoWindow () const
 Auto-select window.
 
const shared_ptr< XComboNode > & mode () const
 T1/T2/StE measurement.
 
const shared_ptr< XUIntNode > & smoothSamples () const
 

of Samples for fitting and display


 
const shared_ptr< XComboNode > & p1Strategy () const
 Strategy for distributing P1 or 2tau.
 
const shared_ptr< XComboNode > & p1Dist () const
 Distribution of P1 or 2tau.
 
const shared_ptr< XItemNode
< XRelaxFuncList, XRelaxFunc > > & 
relaxFunc () const
 Relaxation Function.
 
- Public Member Functions inherited from XSecondaryDriverInterface< T >
 XSecondaryDriverInterface (const char *name, bool runtime, Transaction &tr_meas, const shared_ptr< XMeasure > &meas)
 

Protected Member Functions

virtual void analyze (Transaction &tr, const Snapshot &shot_emitter, const Snapshot &shot_others, XDriver *emitter) throw (XRecordError&)
 This function is called when a connected driver emit a signal.
 
virtual void visualize (const Snapshot &shot)
 
virtual bool checkDependency (const Snapshot &shot_this, const Snapshot &shot_emitter, const Snapshot &shot_others, XDriver *emitter) const
 
- Protected Member Functions inherited from XSecondaryDriverInterface< T >
void connect (const shared_ptr< XPointerItemNode< XDriverList > > &selecter)
 Call this to receive signal/data.
 
void requestAnalysis ()
 
virtual void start ()
 usually nothing to do
 
virtual void stop ()
 usually nothing to do
 

Private Member Functions

void onClearAll (const Snapshot &shot, XTouchableNode *)
 
void onResetFit (const Snapshot &shot, XTouchableNode *)
 
void onActiveChanged (const Snapshot &shot, XValueNodeBase *)
 
void onCondChanged (const Snapshot &shot, XValueNodeBase *)
 
void onP1CondChanged (const Snapshot &shot, XValueNodeBase *)
 
void analyzeSpectrum (Transaction &tr, const std::vector< std::complex< double > > &wave, int origin, double cf, std::deque< std::complex< double > > &value_by_cond)
 
XString iterate (Transaction &tr, shared_ptr< XRelaxFunc > &relax, int itercnt)
 
double distributeP1 (const Snapshot &shot, double uniform_x_0_to_1)
 
void obtainNextP1 (Transaction &tr)
 
void setNextP1 (const Snapshot &shot)
 

Private Attributes

shared_ptr< XRelaxFuncListm_relaxFuncs
 List of relaxation functions.
 
const shared_ptr< XScalarEntrym_t1inv
 Holds 1/T1 or 1/T2 and its std. deviation.
 
const shared_ptr< XScalarEntrym_t1invErr
 
const shared_ptr< XItemNode
< XDriverList, XPulser > > 
m_pulser
 
const shared_ptr< XItemNode
< XDriverList,
XNMRPulseAnalyzer > > 
m_pulse1
 
const shared_ptr< XItemNode
< XDriverList,
XNMRPulseAnalyzer > > 
m_pulse2
 
const shared_ptr< XBoolNodem_active
 
const shared_ptr< XBoolNodem_autoPhase
 
const shared_ptr< XBoolNodem_mInftyFit
 
const shared_ptr< XBoolNodem_absFit
 
const shared_ptr< XBoolNodem_trackPeak
 
const shared_ptr< XDoubleNodem_p1Min
 
const shared_ptr< XDoubleNodem_p1Max
 
const shared_ptr< XDoubleNodem_p1Next
 
const shared_ptr< XDoubleNodem_p1AltNext
 
const shared_ptr< XDoubleNodem_phase
 
const shared_ptr< XDoubleNodem_freq
 
const shared_ptr< XDoubleNodem_bandWidth
 
const shared_ptr< XComboNodem_windowFunc
 
const shared_ptr< XComboNodem_windowWidth
 
const shared_ptr< XBoolNodem_autoWindow
 
const shared_ptr< XComboNodem_mode
 
const shared_ptr< XUIntNodem_smoothSamples
 
const shared_ptr< XComboNodem_p1Strategy
 
const shared_ptr< XComboNodem_p1Dist
 
shared_ptr< XItemNode
< XRelaxFuncList, XRelaxFunc > > 
m_relaxFunc
 
const shared_ptr< XTouchableNodem_resetFit
 
const shared_ptr< XTouchableNodem_clearAll
 
const shared_ptr< XStringNodem_fitStatus
 
shared_ptr< XListenerm_lsnOnClearAll
 
shared_ptr< XListenerm_lsnOnResetFit
 
shared_ptr< XListenerm_lsnOnActiveChanged
 
shared_ptr< XListenerm_lsnOnCondChanged
 
shared_ptr< XListenerm_lsnOnP1CondChanged
 
std::deque< xqcon_ptrm_conUIs
 
shared_ptr< SpectrumSolverWrapperm_solver
 
const qshared_ptr< FrmNMRT1m_form
 
const shared_ptr< XStatusPrinterm_statusPrinter
 
const shared_ptr< XWaveNGraphm_wave
 
std::deque< double > m_windowWidthList
 
atomic< int > m_isPulserControlRequested
 

Static Private Attributes

static const int CONVOLUTION_CACHE_SIZE = (3 * 10)
 
static const char P1DIST_LINEAR [] = "Linear"
 
static const char P1DIST_LOG [] = "Log"
 
static const char P1DIST_RECIPROCAL [] = "Reciprocal"
 
static const char P1STRATEGY_RANDOM [] = "Random"
 
static const char P1STRATEGY_FLATTEN [] = "Flatten"
 

Friends

class XRelaxFunc
 
class XRelaxFuncPlot
 

Detailed Description

Measure Relaxation Curve.

Definition at line 39 of file nmrrelax.h.

Member Function Documentation

bool XNMRT1::checkDependency ( const Snapshot shot_this,
const Snapshot shot_emitter,
const Snapshot shot_others,
XDriver emitter 
) const
protectedvirtual

Checks if the connected drivers have valid time stamps.

Returns
true if dependency is resolved. This function must be reentrant unlike analyze().

Implements XSecondaryDriverInterface< T >.

Definition at line 411 of file nmrrelax.cpp.

XString XNMRT1::iterate ( Transaction tr,
shared_ptr< XRelaxFunc > &  relax,
int  itercnt 
)
private

Does fitting iterations itercnt times

Parameters
relaxa pointer to a realaxation function
itercntcounts
bufa message will be passed

Definition at line 355 of file nmrrelaxfit.cpp.

References mInftyFit(), mode(), and p1Min().

void XNMRT1::visualize ( const Snapshot shot)
protectedvirtual

This function is called after committing XPrimaryDriver::analyzeRaw() or XSecondaryDriver::analyze(). This might be called even if the record is invalid (time() == false).

Implements XSecondaryDriverInterface< T >.

Definition at line 721 of file nmrrelax.cpp.

References Transactional::Node< XNode >::iterate_commit().

Member Data Documentation

const shared_ptr<XWaveNGraph> XNMRT1::m_wave
private

Store reduced points

See Also
m_pt, m_sumpts

Definition at line 217 of file nmrrelax.h.


The documentation for this class was generated from the following files:

Generated for KAME4 by  doxygen 1.8.3