Added stuff from argument parsing to the run experiment function

This commit is contained in:
jupfi 2024-02-08 17:49:10 +01:00
parent af1793d2af
commit 9dcde4d65b

View file

@ -604,12 +604,6 @@ int parseArguments(int argc, char **argv, LimeConfig_t &LimeCfg, std::vector<Con
return 1; return 1;
} }
// convert input in seconds/Hz to samples
for (int ii = 0; ii < LimeCfg.Npulses; ii++) {
LimeCfg.p_dur_smp[ii] = round(LimeCfg.p_dur[ii] * LimeCfg.srate);
LimeCfg.p_frq_smp[ii] = LimeCfg.p_frq[ii] / LimeCfg.srate;
}
return 0; return 0;
} }
@ -667,6 +661,11 @@ int run_experiment(LimeConfig_t LimeCfg, std::vector<Config2HDFattr_t> &HDFattrV
Config2HDFattr_t HDFattr[no_of_attr]; Config2HDFattr_t HDFattr[no_of_attr];
std::copy(HDFattrVector.begin(), HDFattrVector.end(), HDFattr); std::copy(HDFattrVector.begin(), HDFattrVector.end(), HDFattr);
// convert input in seconds/Hz to samples
for (int ii = 0; ii < LimeCfg.Npulses; ii++) {
LimeCfg.p_dur_smp[ii] = round(LimeCfg.p_dur[ii] * LimeCfg.srate);
LimeCfg.p_frq_smp[ii] = LimeCfg.p_frq[ii] / LimeCfg.srate;
}
// check directory first // check directory first
if (makePath(LimeCfg.save_path) == 0) { if (makePath(LimeCfg.save_path) == 0) {