1 #ifndef MHO_PolarizationRelabeler_HH__
2 #define MHO_PolarizationRelabeler_HH__
33 fStationKey =
"station_code";
34 fStationMk4IDKey =
"station_mk4id";
46 if(pol1.size() == 1 && pol2.size() == 1)
56 "MHO_PolarizationRelabeler, only single character polarization labels are supported, ignoring."
75 return fStationIdentities.empty() ? std::string(
"") : fStationIdentities[0];
91 auto pol_axis_ptr = &(std::get< MTPCAL_POL_AXIS >(*in));
92 std::size_t npols = pol_axis_ptr->GetSize();
95 for(std::size_t i = 0; i < npols; i++)
98 std::string pol = pol_axis_ptr->at(i);
103 else if(pol == fPol2)
107 pol_axis_ptr->at(i) = pol;
116 std::string fStationKey;
117 std::string fStationMk4IDKey;
120 std::vector< std::string > fStationIdentities;
126 bool IsApplicable(
const XArrayType* in)
128 std::string mk4id_val, code_val;
129 in->Retrieve(fStationMk4IDKey, mk4id_val);
130 in->Retrieve(fStationKey, code_val);
132 for(
const auto&
id : fStationIdentities)
137 "station identity: " <<
id <<
" is not a recognizable mark4 or 2-character code" << eom);
140 if(
id.size() == 1 && (
id == mk4id_val ||
id ==
"?"))
144 if(
id.size() == 2 && (
id == code_val ||
id ==
"??"))
#define msg_error(xKEY, xCONTENT)
Definition: MHO_Message.hh:238
Class MHO_PolarizationRelabeler.
Definition: MHO_PolarizationRelabeler.hh:29
MHO_PolarizationRelabeler()
Definition: MHO_PolarizationRelabeler.hh:31
void SetStationIdentifier(const std::string &id)
Setter for station identifier.
Definition: MHO_PolarizationRelabeler.hh:69
virtual ~MHO_PolarizationRelabeler()
Definition: MHO_PolarizationRelabeler.hh:40
std::string GetStationIdentifier() const
Definition: MHO_PolarizationRelabeler.hh:73
void SetStationIdentifiers(const std::vector< std::string > &ids)
Definition: MHO_PolarizationRelabeler.hh:71
void SetPolarizationSwapPair(std::string pol1, std::string pol2)
Definition: MHO_PolarizationRelabeler.hh:42
virtual bool ExecuteInPlace(XArrayType *in) override
Function ExecuteInPlace - attaches channel labels based on sky frequency or user specified map.
Definition: MHO_PolarizationRelabeler.hh:86
Class MHO_UnaryOperator.
Definition: MHO_UnaryOperator.hh:24
Definition: MHO_AdhocFlagging.hh:18