FilterAlgorithm does not handle custom steps properly
The get_filter_steps
method in FilterAlgorithm
is used to check if a steps
array was given as an input when the class was declared, and to set default values for steps
if that was not the case. It also checks input_sample_period
/output_sample_period
and removes elements from steps
that are not applicable to the interval, BUT it only does this if the steps
array was not given as an input by the user. If the user includes elements in their input steps
array that do not fall within the given time interval, then FilterAlgorithm
processes the data with the wrong filter steps and outputs bad data.
A possible solution is to update get_filter_steps
to explicitly declare self.steps = STEPS
(it is currently defined in an implicit manner) and move the "steps-trimming" logic to a separate method, with a more applicable name ("trim_steps_array
"?), that is called by get_filter_steps
or by other methods that call .get_filter_steps