|
HOPS
HOPS class reference
|
Class MHO_AdhocPhaseCorrection. More...
#include <MHO_AdhocPhaseCorrection.hh>
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 |
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.
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).
| hops::MHO_AdhocPhaseCorrection::MHO_AdhocPhaseCorrection | ( | ) |
|
virtual |
|
overrideprotectedvirtual |
Implements hops::MHO_UnaryOperator< visibility_type >.
|
inline |
Get the sinewave amplitude in radians.
|
inline |
Get the currently configured correction mode.
|
inline |
Get the sinewave period in seconds.
|
inline |
Get the polynomial coefficients (always 6 entries).
| void hops::MHO_AdhocPhaseCorrection::GetRefAdhocFile | ( | std::string & | filename, |
| std::string & | chans | ||
| ) | const |
Get the adhoc phase file info for the reference station.
| void hops::MHO_AdhocPhaseCorrection::GetRemAdhocFile | ( | std::string & | filename, |
| std::string & | chans | ||
| ) | const |
Get the adhoc phase file info for the remote station.
|
inline |
Get the reference time in seconds from scan start.
|
overrideprotectedvirtual |
Reimplemented from hops::MHO_UnaryOperator< visibility_type >.
|
overrideprotectedvirtual |
Reimplemented from hops::MHO_UnaryOperator< visibility_type >.
|
inline |
Set the sinewave amplitude in radians.
|
inline |
Set the correction mode (NONE, SINEWAVE, POLYNOMIAL, or PHYLE).
|
inline |
Set the sinewave period in seconds.
| void hops::MHO_AdhocPhaseCorrection::SetPolynomialCoeffs | ( | const std::vector< double > & | coeffs | ) |
Set polynomial coefficients for POLYNOMIAL mode.
| coeffs | Coefficients 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. |
| void hops::MHO_AdhocPhaseCorrection::SetRefAdhocFile | ( | const std::string & | filename, |
| const std::string & | chans | ||
| ) |
Set the adhoc phase file for the reference station.
| filename | Path to the adhoc phase file. |
| chans | String of fourfit channel-label characters whose columns appear in the file (e.g. "abcde"). |
| void hops::MHO_AdhocPhaseCorrection::SetRemAdhocFile | ( | const std::string & | filename, |
| const std::string & | chans | ||
| ) |
Set the adhoc phase file for the remote station.
| filename | Path to the adhoc phase file. |
| chans | String of fourfit channel-label characters whose columns appear in the file (e.g. "abcde"). |
|
inline |
Set the reference time used in SINEWAVE and POLYNOMIAL modes.
| tref_sec_from_scan_start | Reference time in seconds measured from the scan start time. The time argument passed to the sinewave/polynomial model is (ap_center_time - tref). |