81 template <toltecIO::DataType data_t, toltecIO::ProdType prod_t, toltecIO::FilterType filter_t>
82 std::string
create_filename(
const std::string,
const std::string, std::string, std::string,
const bool);
85template <toltecIO::DataType data_t, toltecIO::ProdType prod_t, toltecIO::FilterType filter_t>
87 std::string array_name, std::string obsnum,
const bool simu_obs) {
88 std::string filename = filepath;
91 if constexpr (data_t ==
toltec) filename +=
"toltec";
92 else if constexpr (data_t ==
apt) filename +=
"apt";
93 else if constexpr (data_t ==
ppt) filename +=
"ppt";
94 else if constexpr (data_t ==
source) filename +=
"source";
97 filename += simu_obs ?
"_simu" :
"_commissioning";
100 if (!array_name.empty()) filename +=
"_" + array_name;
101 if (!redu_type.empty()) filename +=
"_" + redu_type;
102 if (!obsnum.empty()) filename +=
"_" + obsnum;
105 if constexpr (prod_t ==
noise) filename +=
"_noise";
106 else if constexpr (prod_t ==
psd) filename +=
"_psd";
107 else if constexpr (prod_t ==
hist) filename +=
"_hist";
108 else if constexpr (prod_t ==
rtc_timestream) filename +=
"_rtc_timestream";
109 else if constexpr (prod_t ==
ptc_timestream) filename +=
"_ptc_timestream";
110 else if constexpr (prod_t ==
stats) filename +=
"_stats";
112 if constexpr (filter_t ==
filtered) {
113 filename +=
"_filtered";
117 if constexpr (prod_t ==
map || prod_t ==
noise) {
118 filename +=
"_citlali";
Definition toltec_io.h:10
ProdType
Definition toltec_io.h:21
@ map
Definition toltec_io.h:22
@ hist
Definition toltec_io.h:25
@ stats
Definition toltec_io.h:28
@ ptc_timestream
Definition toltec_io.h:27
@ rtc_timestream
Definition toltec_io.h:26
@ noise
Definition toltec_io.h:23
@ psd
Definition toltec_io.h:24
std::map< Eigen::Index, std::string > array_name_map
Definition toltec_io.h:54
std::map< Eigen::Index, double > array_freq_map
Definition toltec_io.h:68
std::map< Eigen::Index, double > array_wavelength_map
Definition toltec_io.h:61
DataType
Definition toltec_io.h:13
@ source
Definition toltec_io.h:17
@ apt
Definition toltec_io.h:15
@ toltec
Definition toltec_io.h:14
@ ppt
Definition toltec_io.h:16
FilterType
Definition toltec_io.h:32
@ filtered
Definition toltec_io.h:34
@ raw
Definition toltec_io.h:33
std::map< Eigen::Index, Eigen::Index > nw_to_array_map
Definition toltec_io.h:37
std::string create_filename(const std::string, const std::string, std::string, std::string, const bool)
Definition toltec_io.h:86
std::map< Eigen::Index, double > array_fwhm_arcsec
Definition toltec_io.h:75
#define c_m_s
Definition constants.h:12