HOPS
HOPS class reference
MHO_BasicFringeInfo.hh
Go to the documentation of this file.
1 #ifndef MHO_BasicFringeInfo_HH__
2 #define MHO_BasicFringeInfo_HH__
3 
4 #include <cmath>
5 #include <complex>
6 #include <iomanip>
7 #include <sstream>
8 #include <string>
9 
10 #include "MHO_Clock.hh"
11 #include "MHO_Message.hh"
12 
13 namespace hops
14 {
15 
29 {
30 
31  public:
33  virtual ~MHO_BasicFringeInfo(){};
34 
35  public:
36  //helper functions
37 
46  static std::string leftpadzeros_integer(unsigned int n_places, int value);
47 
55  static std::string make_legacy_datetime_format(legacy_hops_date ldate);
56 
64  static std::string make_legacy_datetime_format_v2(legacy_hops_date ldate);
65 
78  static double calculate_snr(double effective_npol, double ap_period, double samp_period, double total_ap_frac,
79  double amp, double bw_corr_factor);
88  static double calculate_mbd_no_ion_error(double freq_spread, double snr);
89 
99  static double calculate_sbd_error(double sbd_sep, double snr, double sbavg);
100 
111  static double calculate_drate_error_v1(double snr, double ref_freq, double total_nap, double ap_delta);
112 
122  static double calculate_drate_error_v2(double snr, double ref_freq, double integration_time);
123 
132  static double calculate_pfd(double snr, double pts_searched);
133 
142  static double calculate_phase_error(double sbavg, double snr);
143 
153  static double calculate_phase_delay_error(double sbavg, double snr, double ref_freq);
154 
163  static double calculate_theory_timerms_phase(double nseg, double snr);
164 
173  static double calculate_theory_timerms_amp(double nseg, double snr);
174 
183  static double calculate_theory_freqrms_phase(double nchan, double snr);
184 
193  static double calculate_theory_freqrms_amp(double nchan, double snr);
194 
206  static void correct_phases_mbd_anchor_sbd(double ref_freq, double freq0, double frequency_spacing, double delta_mbd,
207  double& totphase_deg, double& resphase_deg);
208 
209  //
222  static void ion_covariance(int nfreq, double famp, double snr, double ref_freq, const std::vector< double >& chan_freqs,
223  const std::vector< std::complex< double > >& chan_phasors,
224  std::vector< double >& ion_sigmas);
225 };
226 
227 } // namespace hops
228 
229 #endif
Class MHO_BasicFringeInfo.
Definition: MHO_BasicFringeInfo.hh:29
static double calculate_mbd_no_ion_error(double freq_spread, double snr)
Calculates Multi-Band Delay error assuming no ionospheric effects.
Definition: MHO_BasicFringeInfo.cc:58
static double calculate_sbd_error(double sbd_sep, double snr, double sbavg)
Calculates Single Band Delay (SBD) error using separation, SNR and average SBD.
Definition: MHO_BasicFringeInfo.cc:64
static double calculate_drate_error_v2(double snr, double ref_freq, double integration_time)
Calculates and returns the delay rate error using SNR, reference frequency, and integration time.
Definition: MHO_BasicFringeInfo.cc:87
static double calculate_theory_timerms_phase(double nseg, double snr)
Calculates theoretical RMS phase error for given number of (averaging) segments and SNR.
Definition: MHO_BasicFringeInfo.cc:127
static double calculate_drate_error_v1(double snr, double ref_freq, double total_nap, double ap_delta)
Calculates and returns the delay rate error using SNR, reference frequency, total nap,...
Definition: MHO_BasicFringeInfo.cc:77
static double calculate_pfd(double snr, double pts_searched)
Calculates Probability of False Detection (PFD) given Signal-to-Noise Ratio (SNR) and number of point...
Definition: MHO_BasicFringeInfo.cc:94
static double calculate_theory_freqrms_amp(double nchan, double snr)
Calculates theoretical frequency RMS amplitude error using given number of channels and signal-to-noi...
Definition: MHO_BasicFringeInfo.cc:152
static std::string make_legacy_datetime_format(legacy_hops_date ldate)
Formats legacy date/time as HHMMSS.xx for output.
Definition: MHO_BasicFringeInfo.cc:16
MHO_BasicFringeInfo()
Definition: MHO_BasicFringeInfo.hh:32
static double calculate_snr(double effective_npol, double ap_period, double samp_period, double total_ap_frac, double amp, double bw_corr_factor)
Calculates Signal to Noise Ratio (SNR) using given parameters.
Definition: MHO_BasicFringeInfo.cc:41
static double calculate_theory_freqrms_phase(double nchan, double snr)
Calculates theoretical frequency RMS phase error using number of channels and signal-to-noise ratio.
Definition: MHO_BasicFringeInfo.cc:146
static void correct_phases_mbd_anchor_sbd(double ref_freq, double freq0, double frequency_spacing, double delta_mbd, double &totphase_deg, double &resphase_deg)
Corrects phase for MBD (anchoring to SBD) using reference frequency and frequency spacing.
Definition: MHO_BasicFringeInfo.cc:159
static void ion_covariance(int nfreq, double famp, double snr, double ref_freq, const std::vector< double > &chan_freqs, const std::vector< std::complex< double > > &chan_phasors, std::vector< double > &ion_sigmas)
Only used by MHO_IonosphericFringeFitter, for computing the ionosphere dTEC/MBD covariance.
Definition: MHO_BasicFringeInfo.cc:171
static std::string make_legacy_datetime_format_v2(legacy_hops_date ldate)
Converts legacy_hops_date to format: YYYY:DDD:HHMMSS.
Definition: MHO_BasicFringeInfo.cc:28
static double calculate_phase_delay_error(double sbavg, double snr, double ref_freq)
Calculates phase delay error given sbavg, snr and reference frequency.
Definition: MHO_BasicFringeInfo.cc:119
static double calculate_theory_timerms_amp(double nseg, double snr)
Calculates theoretical time-averaged amplitude error using nseg and SNR.
Definition: MHO_BasicFringeInfo.cc:139
static double calculate_phase_error(double sbavg, double snr)
Calculates phase error given sideband average and signal-to-noise ratio.
Definition: MHO_BasicFringeInfo.cc:111
virtual ~MHO_BasicFringeInfo()
Definition: MHO_BasicFringeInfo.hh:33
static std::string leftpadzeros_integer(unsigned int n_places, int value)
Pads an integer with leading zeros up to a specified number of places.
Definition: MHO_BasicFringeInfo.cc:7
amp
Definition: picking_aedit.py:14
Definition: MHO_ChannelLabeler.hh:17
A struct to avoid name collisions between the mk4utils 'data' struct and the 'date' header library.
Definition: legacy_hops_date.hh:17
Definition: vex.h:175