HOPS
HOPS class reference
Public Member Functions | Protected Member Functions | List of all members
hops::MHO_AdhocPhaseCorrection Class Reference

Class MHO_AdhocPhaseCorrection. More...

#include <MHO_AdhocPhaseCorrection.hh>

Inheritance diagram for hops::MHO_AdhocPhaseCorrection:
[legend]

Public Member Functions

 MHO_AdhocPhaseCorrection ()
 
virtual ~MHO_AdhocPhaseCorrection ()
 
double GetAmplitude () const
 Get the sinewave amplitude in radians. More...
 
AdhocPhaseMode GetMode () const
 Get the currently configured correction mode. More...
 
double GetPeriod () const
 Get the sinewave period in seconds. More...
 
const double * GetPolynomialCoeffs () const
 Get the polynomial coefficients (always 6 entries). More...
 
void GetRefAdhocFile (std::string &filename, std::string &chans) const
 Get the adhoc phase file info for the reference station. More...
 
void GetRemAdhocFile (std::string &filename, std::string &chans) const
 Get the adhoc phase file info for the remote station. More...
 
double GetTRef () const
 Get the reference time in seconds from scan start. More...
 
void SetAmplitude (double amp_rad)
 Set the sinewave amplitude in radians. More...
 
void SetMode (AdhocPhaseMode mode)
 Set the correction mode (NONE, SINEWAVE, POLYNOMIAL, or PHYLE). More...
 
void SetPeriod (double period_sec)
 Set the sinewave period in seconds. More...
 
void SetPolynomialCoeffs (const std::vector< double > &coeffs)
 Set polynomial coefficients for POLYNOMIAL mode. More...
 
void SetRefAdhocFile (const std::string &filename, const std::string &chans)
 Set the adhoc phase file for the reference station. More...
 
void SetRemAdhocFile (const std::string &filename, const std::string &chans)
 Set the adhoc phase file for the remote station. More...
 
void SetTRef (double tref_sec_from_scan_start)
 Set the reference time used in SINEWAVE and POLYNOMIAL modes. More...
 
- Public Member Functions inherited from hops::MHO_UnaryOperator< visibility_type >
 MHO_UnaryOperator ()
 
virtual ~MHO_UnaryOperator ()
 
virtual bool Execute () override
 Executes operation using provided arguments and return type. More...
 
virtual bool Execute () override=0
 Function Execute. More...
 
virtual bool Initialize () override
 Initializes the system using in-place or out-of-place arguments. More...
 
virtual bool Initialize () override=0
 Function Initialize. More...
 
 MHO_Operator ()
 
void SetArgs (const visibility_type *in, visibility_type *out)
 Setter for args. More...
 
void SetArgs (visibility_type *in)
 Setter for args. More...
 
- Public Member Functions inherited from hops::MHO_Operator
 MHO_Operator ()
 
virtual ~MHO_Operator ()
 
std::string GetName () const
 Getter for operator name. More...
 
double Priority () const
 Get the the priority field value. More...
 
void SetName (std::string name)
 Setter for operator name. More...
 
void SetPriority (double priority)
 Setter for operator priority (determines order of execution within a operator category) More...
 

Protected Member Functions

virtual bool ExecuteInPlace (visibility_type *in) override
 
virtual bool InitializeInPlace (visibility_type *in) override
 
virtual bool InitializeOutOfPlace (const visibility_type *in, visibility_type *out) override
 
- Protected Member Functions inherited from hops::MHO_UnaryOperator< visibility_type >
virtual bool ExecuteOutOfPlace (const visibility_type *in, visibility_type *out)
 

Additional Inherited Members

- Protected Attributes inherited from hops::MHO_UnaryOperator< visibility_type >
bool fInPlace
 
std::tuple< visibility_type * > fInPlaceArgs
 
std::tuple< const visibility_type *, visibility_type * > fOutOfPlaceArgs
 

Detailed Description

Class MHO_AdhocPhaseCorrection.

Port of the legacy fourfit 'adhoc_phase' feature. Applies a time- and (for file mode) channel-dependent phase correction exp(-i*zeta) to the visibility data. Three modes are supported, mirroring the legacy SINEWAVE, POLYNOMIAL, and PHYLE constants.

Author
J. Barrett - barre.nosp@m.ttj@.nosp@m.mit.e.nosp@m.du
Date

Reference time (fTRef) and polynomial/sinewave time arguments are measured in seconds relative to most recent hour, which is read from the "start" tag of the visibility object during Initialize.

//DIRECTLY FROM <vhelp fourfit>

adhoc_phase 'sinewave', 'polynomial', or 'file' adhoc_period For ad hoc sinewave model; the period in integer seconds. adhoc_amp " " " " " amplitude in degrees of phase. adhoc_tref For both ad hoc phase models; the reference time in seconds past the most recent hour. adhoc_poly For the ad hoc phase polynomial model; From 1-6 coefficients describing a power-series model in time. (deg/sec^n) adhoc_file Name of the file containing phases in the ad hoc file mode. adhoc_file_chans String of channel labels for phases (columns) in the ad hoc file.

File (PHYLE) mode: two optional ASCII files, one per station (reference and remote). Each data line contains: <t_fpday> <phase_ch0_deg> <phase_ch1_deg> ... where t_fpday is fractional days since beginning of year and phases are in degrees. The column order is defined by the corresponding fAhFileChans string (one character per column matching the fourfit channel-label / freq-code, e.g. "abcdef"). The applied correction is the differential phase: phase_ref - phase_rem (same sign convention as the legacy diff_file_phase function).

Constructor & Destructor Documentation

◆ MHO_AdhocPhaseCorrection()

hops::MHO_AdhocPhaseCorrection::MHO_AdhocPhaseCorrection ( )

◆ ~MHO_AdhocPhaseCorrection()

hops::MHO_AdhocPhaseCorrection::~MHO_AdhocPhaseCorrection ( )
virtual

Member Function Documentation

◆ ExecuteInPlace()

bool hops::MHO_AdhocPhaseCorrection::ExecuteInPlace ( visibility_type in)
overrideprotectedvirtual

◆ GetAmplitude()

double hops::MHO_AdhocPhaseCorrection::GetAmplitude ( ) const
inline

Get the sinewave amplitude in radians.

◆ GetMode()

AdhocPhaseMode hops::MHO_AdhocPhaseCorrection::GetMode ( ) const
inline

Get the currently configured correction mode.

◆ GetPeriod()

double hops::MHO_AdhocPhaseCorrection::GetPeriod ( ) const
inline

Get the sinewave period in seconds.

◆ GetPolynomialCoeffs()

const double* hops::MHO_AdhocPhaseCorrection::GetPolynomialCoeffs ( ) const
inline

Get the polynomial coefficients (always 6 entries).

◆ GetRefAdhocFile()

void hops::MHO_AdhocPhaseCorrection::GetRefAdhocFile ( std::string &  filename,
std::string &  chans 
) const

Get the adhoc phase file info for the reference station.

◆ GetRemAdhocFile()

void hops::MHO_AdhocPhaseCorrection::GetRemAdhocFile ( std::string &  filename,
std::string &  chans 
) const

Get the adhoc phase file info for the remote station.

◆ GetTRef()

double hops::MHO_AdhocPhaseCorrection::GetTRef ( ) const
inline

Get the reference time in seconds from scan start.

◆ InitializeInPlace()

bool hops::MHO_AdhocPhaseCorrection::InitializeInPlace ( visibility_type in)
overrideprotectedvirtual

◆ InitializeOutOfPlace()

bool hops::MHO_AdhocPhaseCorrection::InitializeOutOfPlace ( const visibility_type in,
visibility_type out 
)
overrideprotectedvirtual

◆ SetAmplitude()

void hops::MHO_AdhocPhaseCorrection::SetAmplitude ( double  amp_rad)
inline

Set the sinewave amplitude in radians.

◆ SetMode()

void hops::MHO_AdhocPhaseCorrection::SetMode ( AdhocPhaseMode  mode)
inline

Set the correction mode (NONE, SINEWAVE, POLYNOMIAL, or PHYLE).

◆ SetPeriod()

void hops::MHO_AdhocPhaseCorrection::SetPeriod ( double  period_sec)
inline

Set the sinewave period in seconds.

◆ SetPolynomialCoeffs()

void hops::MHO_AdhocPhaseCorrection::SetPolynomialCoeffs ( const std::vector< double > &  coeffs)

Set polynomial coefficients for POLYNOMIAL mode.

Parameters
coeffsCoefficients c_0..c_N where zeta = c_0 + c_1*t + c_2*t^2 + ... (t in seconds from tref). Up to 6 coefficients are used; excess entries are ignored, missing entries default to zero.

◆ SetRefAdhocFile()

void hops::MHO_AdhocPhaseCorrection::SetRefAdhocFile ( const std::string &  filename,
const std::string &  chans 
)

Set the adhoc phase file for the reference station.

Parameters
filenamePath to the adhoc phase file.
chansString of fourfit channel-label characters whose columns appear in the file (e.g. "abcde").

◆ SetRemAdhocFile()

void hops::MHO_AdhocPhaseCorrection::SetRemAdhocFile ( const std::string &  filename,
const std::string &  chans 
)

Set the adhoc phase file for the remote station.

Parameters
filenamePath to the adhoc phase file.
chansString of fourfit channel-label characters whose columns appear in the file (e.g. "abcde").

◆ SetTRef()

void hops::MHO_AdhocPhaseCorrection::SetTRef ( double  tref_sec_from_scan_start)
inline

Set the reference time used in SINEWAVE and POLYNOMIAL modes.

Parameters
tref_sec_from_scan_startReference time in seconds measured from the scan start time. The time argument passed to the sinewave/polynomial model is (ap_center_time - tref).

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