Skip to content
Snippets Groups Projects
Commit 98f3f154 authored by Robert Butora's avatar Robert Butora
Browse files

vlkb-obscore: fixes bug where (rest)frequency was taken from transition-...

vlkb-obscore: fixes bug where (rest)frequency was taken from transition- instead of (rest)frequency-field of matadata
parent 1f569fdf
No related branches found
No related tags found
No related merge requests found
......@@ -308,7 +308,9 @@ void SqlSchema_INSERT::appendRow(
// surv.survTransition "num unit" <-- for images
try
{
double val{parse_transition(surv.survTransition)};
//double val{parse_transition(surv.survTransition)};
const double SPEED_OF_LIGHT{299792458};// [m/s]
double val{SPEED_OF_LIGHT / surv.restFrequency};
obscoreRow[em_min] = to_string(val); //get_wavelen(EM_PRECISION, hdu.key_values);
}
catch(const std::exception& ex)
......
......@@ -201,7 +201,7 @@ vector<survey> parse_surveys(string filename, bool skip_first_row)
case 2: surv.species = field; break;
case 3: surv.transition = field; break;
// vlkb-internal extra-data
case 4: surv.rest_frequency_Hz = stoul(field); break;
case 4: surv.rest_frequency_Hz = stoull(field); break;
case 5: break; // NOT USED surv.restf_fits_unit = to_stringN(field, 20); break;
case 6: surv.velocity_fits_unit = to_velocity_unit(field); break;
// vlkb-internal did-resolution
......@@ -218,7 +218,8 @@ vector<survey> parse_surveys(string filename, bool skip_first_row)
// security
case 15: surv.auth_policy = to_authorization_policy(field); break;
default:
my_assert(false, __FILE__,__LINE__, "too many fileds in a row of surveys metadata file: " + filename);
my_assert(false, __FILE__,__LINE__,
"too many fileds in a row of surveys metadata file: " + filename);
}
}
surveys.push_back(surv);
......
......@@ -28,7 +28,7 @@ struct survey
std::string name;
std::string species;
std::string transition;
unsigned long rest_frequency_Hz;
unsigned long long rest_frequency_Hz;
// std::string restf_fits_unit; // NOT used
velocity_unit velocity_fits_unit;
std::string storage_path;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment