Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions utilitiesApp/src/find_calibration_range_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,19 @@ long find_calibration_range_impl(aSubRecord *prec) {
return 1;
}

// Get highest and lowest values in the first column of the calibration file
double low_limit = std::stod(lines[0][0]);
// Get highest and lowest values in the first column of the calibration file
// skip over lines which start with '#' as they are the header.
int first_value = 0;
for (auto& line : lines) {
if (line[0].rfind("#", 0) == 0) {
first_value++;
}
else {
break;
}
}

double low_limit = std::stod(lines[first_value][0]);
double high_limit = std::stod(lines[lines.size() - 1][0]);

// Check the types of output values
Expand Down