Class MEAL::PhaseGradients
-
template<typename T>
class PhaseGradients : public MEAL::Univariate<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:
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!
Model each observation using an unique phase offset between the observation 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 (Complex2) or as a complex-valued scalar (Complex).
Public Functions
-
PhaseGradients(unsigned ngradient = 0)
Default constructor.
-
PhaseGradients(const PhaseGradients&)
Copy constructor.
-
PhaseGradients &operator=(const PhaseGradients&)
Assignment operator.
-
virtual PhaseGradients *clone() const
Clone operator.
-
unsigned get_ngradient() const
Get the number of gradients.
-
void set_igradient(unsigned igradient)
Set the current phase gradient index.
Set the current phase gradient.
-
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.
Add another gradient to the set.
-
void resize(unsigned ngradient)
Set the number of gradients.
-
std::string get_name() const
Return the name of the class.