1 #ifndef MHO_MK4StationInterface_HH__
2 #define MHO_MK4StationInterface_HH__
96 std::string getstr(
const char* char_array, std::size_t max_size)
98 return std::string(char_array,
std::min(strlen(char_array), max_size));
104 void ReadStationFile();
117 void ExtractPCal(
int n309,
type_309** t309);
135 std::map< std::string, channel_axis_type > ConstructPerPolChannelAxis();
142 std::map< std::string, std::vector< mho_json > > ConstructChannelInfo();
155 bool ExtractChannelInfo(
const std::string& ch_name, std::string& fgroup, std::string& sb, std::string& pol,
int& index);
162 std::string FreqGroupFromMK4ChannelID(std::string
id)
const;
169 std::string PolFromMK4ChannelID(std::string
id)
const;
176 std::string SidebandFromMK4ChannelId(std::string
id)
const;
183 int IndexFromMK4ChannelId(std::string
id)
const;
195 std::complex< double > ComputePhasor(uint32_t real, uint32_t imag,
double acc_period,
double sample_period);
198 std::vector< std::string > GetFreqGroups(
int n309,
type_309** t309);
200 std::vector< std::pair< std::string, int > > GetFreqGroupPolInfo(
int n309,
type_309** t309,
const std::string& fg,
209 void TagPCalStartTime(
int n309,
type_309** t309);
214 bool ROTIsCentroid()
const;
219 bool TonesInDescendingOrder(
type_309* t309,
int start,
int stop)
const;
224 static int DaysInYear(
int year);
228 std::string fStationName;
229 std::string fStationCode;
230 std::string fStationMK4ID;
235 std::string fStationFile;
236 std::string fVexFile;
237 std::string fRootCode;
238 std::size_t fNCoeffs;
239 std::size_t fNIntervals;
251 double a_freq = a[
"sky_freq"].get<
double >();
252 double b_freq = b[
"sky_freq"].get<
double >();
253 double a_bw = a[
"bandwidth"].get<
double >();
254 double b_bw = b[
"bandwidth"].get<
double >();
255 std::string a_sb = a[
"net_sideband"].get< std::string >();
256 std::string b_sb = b[
"net_sideband"].get< std::string >();
278 double a_center_freq = a_freq + a_bw * a_sgn / 2.0;
279 double b_center_freq = b_freq + b_bw * b_sgn / 2.0;
281 return a_center_freq < b_center_freq;
285 ChannelLess fChannelPredicate;
MHO_MK4StationInterface converts a mk4 station file (type_3xx) to HOPS4 format.
Definition: MHO_MK4StationInterface.hh:48
MHO_MK4StationInterface()
Definition: MHO_MK4StationInterface.cc:37
void SetVexFile(const std::string &vex)
Setter for vex file.
Definition: MHO_MK4StationInterface.hh:58
station_coord_type * ExtractStationFile()
Extracts station coordinate data from files and allocates memory for it.
Definition: MHO_MK4StationInterface.cc:69
mk4_sdata * GetStationData()
Getter for station data.
Definition: MHO_MK4StationInterface.hh:72
virtual ~MHO_MK4StationInterface()
Definition: MHO_MK4StationInterface.cc:47
void SetStationFile(const std::string &station)
Setter for station file.
Definition: MHO_MK4StationInterface.hh:65
multitone_pcal_type * GetPCalObject()
Getter for pcal object.
Definition: MHO_MK4StationInterface.hh:86
Class MHO_TableContainer.
Definition: MHO_TableContainer.hh:36
#define min(a, b)
Definition: max555.c:9
Definition: mk4_data.h:108
Definition: MHO_AdhocFlagging.hh:18
MHO_TableContainer< pcal_phasor_type, multitone_pcal_axis_type > multitone_pcal_type
Definition: MHO_StationContainers.hh:30
Definition: type_309.h:34