Commit 34463b00 authored by Achim Morschhauser's avatar Achim Morschhauser
Browse files

Bugfix in filtering data with different filter windows

- Filter was also applied when no appropriate filter available
parent 3e424b19
......@@ -354,10 +354,14 @@ int Filter_Obs::lowpass_PLASMON_1Hz(buffer_obs* buffer_in,
try {
filter1_win = &;
// Filter data
filter_data_temp->filter_fir_sym(&tofilter1, filter1_win);
} catch (const std::out_of_range &oor) {
// if we get here, it means we don't have enough data to filter. A block probably got shortened.
// In this case, set data value to NaN
std::cerr << "Set values to MD!"
<< std::endl;
("%Y-%m-%d %H:%M:%S",true);
......@@ -367,9 +371,6 @@ int Filter_Obs::lowpass_PLASMON_1Hz(buffer_obs* buffer_in,
<< std::endl;
// Filter data
filter_data_temp->filter_fir_sym(&tofilter1, filter1_win);
//std::string tmp_str;
//std::cerr << "DEBUG ADD FILTER2: " << tmp_str << std::endl;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment