1 #ifndef MHO_AdhocPhaseCorrection_HH__
2 #define MHO_AdhocPhaseCorrection_HH__
102 void SetTRef(
double tref_sec_from_scan_start) { fTRef = tref_sec_from_scan_start; }
116 void SetPeriod(
double period_sec) { fPeriod = period_sec; }
163 void SetRefAdhocFile(
const std::string& filename,
const std::string& chans);
177 void SetRemAdhocFile(
const std::string& filename,
const std::string& chans);
195 bool LoadAdhocFile(std::size_t stn_idx);
205 double ComputeZeta(
const std::string& chan_label,
double ap_center_sec)
const;
215 double InterpolateFilePhase(std::size_t stn_idx,
char fcode,
double t_fpday)
const;
230 double fPolyCoeffs[6];
233 std::string fAhFile[2];
234 std::string fAhFileChans[2];
239 std::vector< double > fFileData[2];
240 std::size_t fNFileRows[2];
241 std::size_t fNFileCols[2];
246 double fScanStartFpDay;
247 double fScanStartSecPastHour;
254 std::complex< double > fImagUnit;
255 std::string fChannelLabelKey;
256 std::string fStartKey;
Class MHO_AdhocPhaseCorrection.
Definition: MHO_AdhocPhaseCorrection.hh:72
MHO_AdhocPhaseCorrection()
Definition: MHO_AdhocPhaseCorrection.cc:10
void SetPolynomialCoeffs(const std::vector< double > &coeffs)
Set polynomial coefficients for POLYNOMIAL mode.
Definition: MHO_AdhocPhaseCorrection.cc:47
void SetRefAdhocFile(const std::string &filename, const std::string &chans)
Set the adhoc phase file for the reference station.
Definition: MHO_AdhocPhaseCorrection.cc:66
virtual bool InitializeOutOfPlace(const visibility_type *in, visibility_type *out) override
Definition: MHO_AdhocPhaseCorrection.cc:162
void SetPeriod(double period_sec)
Set the sinewave period in seconds.
Definition: MHO_AdhocPhaseCorrection.hh:116
void SetTRef(double tref_sec_from_scan_start)
Set the reference time used in SINEWAVE and POLYNOMIAL modes.
Definition: MHO_AdhocPhaseCorrection.hh:102
AdhocPhaseMode GetMode() const
Get the currently configured correction mode.
Definition: MHO_AdhocPhaseCorrection.hh:89
void SetRemAdhocFile(const std::string &filename, const std::string &chans)
Set the adhoc phase file for the remote station.
Definition: MHO_AdhocPhaseCorrection.cc:78
double GetTRef() const
Get the reference time in seconds from scan start.
Definition: MHO_AdhocPhaseCorrection.hh:107
void GetRefAdhocFile(std::string &filename, std::string &chans) const
Get the adhoc phase file info for the reference station.
Definition: MHO_AdhocPhaseCorrection.cc:72
void SetMode(AdhocPhaseMode mode)
Set the correction mode (NONE, SINEWAVE, POLYNOMIAL, or PHYLE).
Definition: MHO_AdhocPhaseCorrection.hh:84
const double * GetPolynomialCoeffs() const
Get the polynomial coefficients (always 6 entries).
Definition: MHO_AdhocPhaseCorrection.hh:150
double GetPeriod() const
Get the sinewave period in seconds.
Definition: MHO_AdhocPhaseCorrection.hh:121
void GetRemAdhocFile(std::string &filename, std::string &chans) const
Get the adhoc phase file info for the remote station.
Definition: MHO_AdhocPhaseCorrection.cc:84
virtual bool ExecuteInPlace(visibility_type *in) override
Definition: MHO_AdhocPhaseCorrection.cc:265
double GetAmplitude() const
Get the sinewave amplitude in radians.
Definition: MHO_AdhocPhaseCorrection.hh:131
void SetAmplitude(double amp_rad)
Set the sinewave amplitude in radians.
Definition: MHO_AdhocPhaseCorrection.hh:126
virtual bool InitializeInPlace(visibility_type *in) override
Definition: MHO_AdhocPhaseCorrection.cc:90
virtual ~MHO_AdhocPhaseCorrection()
Definition: MHO_AdhocPhaseCorrection.cc:40
Class MHO_UnaryOperator.
Definition: MHO_UnaryOperator.hh:24
Definition: MHO_AdhocFlagging.hh:18
AdhocPhaseMode
Ad hoc phase correction mode, mirrors legacy SINEWAVE/POLYNOMIAL/PHYLE constants.
Definition: MHO_AdhocPhaseCorrection.hh:61