MEAL::PhaseGradients< T > Class Template Reference

Multiple phase gradients parameterized by their slopes. More...

#include <PhaseGradients.h>

Inheritance diagram for MEAL::PhaseGradients< T >:
MEAL::Univariate< T >

Public Member Functions

 PhaseGradients (unsigned ngradient=0)
 Default constructor.
 
 PhaseGradients (const PhaseGradients &)
 Copy constructor.
 
PhaseGradientsoperator= (const PhaseGradients &)
 Assignment operator.
 
PhaseGradientsclone () const
 Clone operator.
 
unsigned get_ngradient () const
 Get the number of gradients.
 
void set_igradient (unsigned igradient)
 Set the current phase gradient index. More...
 
unsigned get_igradient () const
 Get the current phase gradient index.
 
void set_offset (unsigned igradient, double offset)
 Set the current phase gradient index.
 
double get_offset (unsigned igradient) const
 Get the current phase gradient index.
 
void add_gradient ()
 Add another gradient to the set.
 
void remove_gradient ()
 Remove the last gradient from the set. More...
 
void resize (unsigned ngradient)
 Set the number of gradients.
 
std::string get_name () const
 Return the name of the class.
 
- Public Member Functions inherited from MEAL::Univariate< T >
 Univariate ()
 Default constructor.
 
 Univariate (const Univariate &copy)
 Copy constructor.
 
Univariateoperator= (const Univariate &copy)
 Assignment operator.
 
Univariate< T > * clone () const
 Clone.
 
virtual void set_abscissa (double value)
 Set the abscissa value.
 
double get_abscissa () const
 Get the abscissa value.
 
T::Result compute (double x)
 Evaluate the function.
 

Protected Member Functions

void calculate (typename T::Result &result, std::vector< typename T::Result > *gradient)
 Calculate the Jones matrix and its gradient. More...
 
- Protected Member Functions inherited from MEAL::Univariate< T >
void set_univariate_policy (UnivariatePolicy *policy)
 
UnivariatePolicyget_univariate_policy () const
 
void copy_univariate_policy (const Univariate *other)
 Copy the parameter policy of another instance.
 

Protected Attributes

Parameters parameters
 Parameter policy.
 
std::vector< double > offsets
 The phase offsets.
 
unsigned igradient
 The current phase gradient.
 

Detailed Description

template<typename T>
class MEAL::PhaseGradients< T >

Multiple phase gradients parameterized by their slopes.

When performing Measurement Equation Template Matching (METM), multiple observed pulse profiles are fit to a single well-calibrated standard template profile. In this case, there are two options:

  1. Assume that the ephemeris is good and model all observations using a single phase offset between them and the standard profile; in this case, this class stores and is parameterized by a single gradient (and offset).

WARNING: A single offset also assumes that all observations also have the same number of phase bins. This should be checked!

  1. Model each observation using an unique phase offset between the observaiton and the standard profile; in this case, this class stores and is parameterized by multiple gradients (and offsets).

This class is a template so that it can be used as a Jones matrix (Complex 2) or as a complex-valued scalar (Complex).

Member Function Documentation

◆ calculate()

template<typename T >
void MEAL::PhaseGradients< T >::calculate ( typename T::Result &  result,
std::vector< typename T::Result > *  gradient 
)
protected

Calculate the Jones matrix and its gradient.

Calculate the Jones matrix and its gradient, as parameterized by gain.

References MEAL::cos(), and MEAL::sin().

◆ remove_gradient()

template<typename T >
void MEAL::PhaseGradients< T >::remove_gradient

Remove the last gradient from the set.

Add another gradient to the set.

◆ set_igradient()

template<typename T >
void MEAL::PhaseGradients< T >::set_igradient ( unsigned  igradient)

Set the current phase gradient index.

Set the current phase gradient.


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

Generated using doxygen 1.8.17