The matrix template matching algorithm. More...

#include <PolnProfileFit.h>

Inheritance diagram for Pulsar::PolnProfileFit:
Reference::Able Reference::HeapTracked

Classes

class  Analysis
 Analysis of the matrix template matching algorithm. More...
 

Public Member Functions

 PolnProfileFit ()
 Default constructor.
 
 PolnProfileFit (const PolnProfileFit &fit)
 Copy constructor.
 
PolnProfileFitoperator= (const PolnProfileFit &fit)
 Assignment operator. More...
 
 ~PolnProfileFit ()
 Destructor.
 
PolnProfileFitclone () const
 Clone.
 
void set_maximum_harmonic (unsigned max)
 Set the maximum number of harmonics to include in fit.
 
unsigned get_maximum_harmonic () const
 Get the maximum number of harmonics to include in fit.
 
unsigned get_nharmonic () const
 Get the number of harmonics to be included in fit.
 
void set_regions (const PhaseWeight &pulse, const PhaseWeight &baseline)
 Set the on-pulse and baseline regions.
 
void set_standard (const PolnProfile *standard)
 Set the standard to which observations will be fit.
 
const PolnProfileget_standard () const
 Get the standard to which observations will be fit.
 
void add_observation (Calibration::CoherencyMeasurementSet &, const PolnProfile *)
 Add the specified observation to the measurement set.
 
void add_observation (const PolnProfile *)
 Add the specified observation to the measurement equation.
 
void set_observation (const PolnProfile *)
 Set the only observation to be fit to the standard.
 
void delete_observations ()
 Delete any previously added observations.
 
void set_measurement_set (const Calibration::CoherencyMeasurementSet &)
 Set the template from which measurment sets will be constructed.
 
void set_transformation (MEAL::Complex2 *xform)
 Set the transformation between the standard and observation.
 
MEAL::Complex2get_transformation () const
 Get the transformation between the standard and the observation.
 
void set_fit_debug (bool flag=true)
 Set the debug mode in the ReceptionModel.
 
void set_normalize_by_invariant (bool set=true)
 Normalize each Stokes vector by the mean on-pulse invariant.
 
void fit (const PolnProfile *observation)
 Fit the specified observation to the standard.
 
void solve ()
 Fit all observations to the standard.
 
void set_plan (FTransform::Plan *)
 Set the fourier transform plan.
 
Calibration::ReceptionModelget_equation ()
 Get the measurement equation used to model the fit.
 
const Calibration::ReceptionModelget_equation () const
 
Estimate< double > get_phase () const
 Get the phase offset between the standard and the observation. More...
 
double get_reduced_chisq () const
 Get the statistical goodness of fit.
 
void set_phase (const Estimate< double > &phase)
 Set the phase offset between the observation and the standard. More...
 
void set_phase_lock (bool locked)
 Lock pulse phase; i.e., do not allow pulse phase to vary in fit.
 
void share_phase ()
 Share a single phase shift between all input observations.
 
void remove_phase ()
 Remove pulse phase from model (may be more efficient, but irreversible)
 
Tempo::toa get_toa (const PolnProfile *observation, const MJD &mjd, double period, const std::string &nsite)
 Get the arrival time estimate. More...
 
float ccf_max_phase (const Profile *std, const Profile *obs) const
 Return the phase shift based on the cross correlation function.
 
Calibration::StandardSpectraget_spectra ()
 Get the statistical interface to the data.
 
- Public Member Functions inherited from Reference::Able
 Able (const Able &)
 
Ableoperator= (const Able &)
 
unsigned get_reference_count () const
 
- Public Member Functions inherited from Reference::HeapTracked
 HeapTracked (const HeapTracked &)
 
HeapTrackedoperator= (const HeapTracked &)
 
bool __is_on_heap () const
 

Public Attributes

bool choose_maximum_harmonic
 Set true when set_standard should choose the maximum harmonic.
 
bool manage_equation_transformation
 Manage the equation transformation.
 

Static Public Attributes

static bool verbose = false
 Verbosity flag.
 

Protected Member Functions

void init ()
 Construtor helper.
 
- Protected Member Functions inherited from Reference::Able
Handle__reference (bool active) const
 
void __dereference (bool auto_delete=true) const
 

Protected Attributes

unsigned maximum_harmonic
 The maximum number of harmonics to include in the fit.
 
unsigned n_harmonic
 The number of harmonics in the fit.
 
bool shared_phase
 Share a single phase shift between all input observations.
 
bool phase_lock
 Lock the phase to the initial estimate.
 
Reference::To< const PolnProfilestandard
 The standard to which observations will be fit.
 
Reference::To< const PolnProfilestandard_fourier
 The Fourier transform of the standard.
 
Reference::To< MEAL::Complex2transformation
 The transformation between the standard and observation.
 
Reference::To< Calibration::StandardSpectrastandard_data
 Normalization by total invariant interval with error propagation.
 
Reference::To< Calibration::ReceptionModelequation
 The measurement equation used to model the fit.
 
std::vector< Reference::To< Calibration::TemplateUncertainty > > uncertainty
 Least-squares normalization includes variable template contribution.
 
Reference::To< MEAL::PhaseGradients< MEAL::Complex2 > > phases
 The phase gradient model for each observation added.
 
MEAL::Axis< double > phase_axis
 The phase axis.
 
MEAL::Axis< unsigned > index_axis
 The gradient index axis.
 
Calibration::CoherencyMeasurementSet measurement_set
 The template from which measurement sets are constructed.
 
bool fit_debug
 The fit debug flag.
 
Stokes< std::complex< double > > standard_variance
 

Friends

class ScalarProfileFitAnalysis
 

Additional Inherited Members

- Static Public Member Functions inherited from Reference::Able
static size_t get_instance_count ()
 
- Static Public Member Functions inherited from Reference::HeapTracked
static void * operator new (size_t size, void *ptr=0)
 
static void operator delete (void *location, void *ptr)
 
static void operator delete (void *location)
 
static size_t get_heap_queue_size ()
 

Detailed Description

The matrix template matching algorithm.

This class may be used to find the full polarimetric best-fit between observed and standard pulse profiles. The fit yields both the polarimetric transformation and the phase shift between the two profiles, which may be used to calibrate the instrumental response and/or calculate arrival time estimates.

Member Function Documentation

◆ get_phase()

Estimate< double > PolnProfileFit::get_phase ( ) const

Get the phase offset between the standard and the observation.

Get the phase offset between the observation and the standard.

◆ get_toa()

Tempo::toa PolnProfileFit::get_toa ( const PolnProfile observation,
const MJD mjd,
double  period,
const std::string &  nsite 
)

Get the arrival time estimate.

Calculates the shift between Returns a basic Tempo::toa object

References Pulsar::Profile::get_centre_frequency(), Pulsar::PolnProfile::get_Profile(), Estimate< class, class >::val, and Estimate< class, class >::var.

◆ operator=()

PolnProfileFit & PolnProfileFit::operator= ( const PolnProfileFit fit)

Assignment operator.

This operator is under development and is not fit for use

◆ set_phase()

void PolnProfileFit::set_phase ( const Estimate< double > &  phase)

Set the phase offset between the observation and the standard.

Get the phase offset between the observation and the standard.


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

Generated using doxygen 1.8.17