1 #ifndef MHO_MK4StationInterface_HH__
2 #define MHO_MK4StationInterface_HH__
97 std::string getstr(
const char* char_array, std::size_t max_size)
99 return std::string(char_array,
std::min(strlen(char_array), max_size));
105 void ReadStationFile();
118 void ExtractPCal(
int n309,
type_309** t309);
136 std::map< std::string, channel_axis_type > ConstructPerPolChannelAxis();
143 std::map< std::string, std::vector< mho_json > > ConstructChannelInfo();
156 bool ExtractChannelInfo(
const std::string& ch_name, std::string& fgroup, std::string& sb, std::string& pol,
int& index);
163 std::string FreqGroupFromMK4ChannelID(std::string
id)
const;
170 std::string PolFromMK4ChannelID(std::string
id)
const;
177 std::string SidebandFromMK4ChannelId(std::string
id)
const;
184 int IndexFromMK4ChannelId(std::string
id)
const;
196 std::complex< double > ComputePhasor(uint32_t real, uint32_t imag,
double acc_period,
double sample_period);
199 std::vector< std::string > GetFreqGroups(
int n309,
type_309** t309);
201 std::vector< std::pair< std::string, int > > GetFreqGroupPolInfo(
int n309,
type_309** t309,
const std::string& fg,
206 std::string fStationName;
207 std::string fStationCode;
208 std::string fStationMK4ID;
213 std::string fStationFile;
214 std::string fVexFile;
215 std::string fRootCode;
216 std::size_t fNCoeffs;
217 std::size_t fNIntervals;
229 double a_freq = a[
"sky_freq"].get<
double >();
230 double b_freq = b[
"sky_freq"].get<
double >();
231 double a_bw = a[
"bandwidth"].get<
double >();
232 double b_bw = b[
"bandwidth"].get<
double >();
233 std::string a_sb = a[
"net_sideband"].get< std::string >();
234 std::string b_sb = b[
"net_sideband"].get< std::string >();
256 double a_center_freq = a_freq + a_bw * a_sgn / 2.0;
257 double b_center_freq = b_freq + b_bw * b_sgn / 2.0;
259 return a_center_freq < b_center_freq;
263 ChannelLess fChannelPredicate;
MHO_MK4StationInterface converts a mk4 station file (type_3xx) to HOPS4 format.
Definition: MHO_MK4StationInterface.hh:49
MHO_MK4StationInterface()
Definition: MHO_MK4StationInterface.cc:37
void SetVexFile(const std::string &vex)
Setter for vex file.
Definition: MHO_MK4StationInterface.hh:59
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:73
virtual ~MHO_MK4StationInterface()
Definition: MHO_MK4StationInterface.cc:47
void SetStationFile(const std::string &station)
Setter for station file.
Definition: MHO_MK4StationInterface.hh:66
multitone_pcal_type * GetPCalObject()
Getter for pcal object.
Definition: MHO_MK4StationInterface.hh:87
Class MHO_TableContainer.
Definition: MHO_TableContainer.hh:36
#define min(a, b)
Definition: max555.c:9
Definition: mk4_data.h:108
Definition: MHO_ChannelLabeler.hh:17
MHO_TableContainer< pcal_phasor_type, multitone_pcal_axis_type > multitone_pcal_type
Definition: MHO_StationContainers.hh:30
Definition: type_309.h:33