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

vlkb-obscore: if surveys::rest_frequency=0 insert NULL to avoid Inf when calc band (em_min/max)

parent 70b03e90
No related branches found
No related tags found
No related merge requests found
...@@ -316,7 +316,7 @@ void SqlSchema_INSERT::appendRow( ...@@ -316,7 +316,7 @@ void SqlSchema_INSERT::appendRow(
{ {
const double SPEED_OF_LIGHT{299792458};// [m/s] const double SPEED_OF_LIGHT{299792458};// [m/s]
double val{SPEED_OF_LIGHT / rest_frequency}; double val{SPEED_OF_LIGHT / rest_frequency};
obscoreRow[em_min] = to_string(val); //get_wavelen(EM_PRECISION, hdu.key_values); obscoreRow[em_min] = (rest_frequency==0.0) ? "NULL" : to_string(val); //get_wavelen(EM_PRECISION, hdu.key_values);
} }
catch(const std::exception& ex) catch(const std::exception& ex)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment