When working with any kind of measurement data there is (at least) for me always a phase where I have to play around with different filters (such as MedianFilter
, MeanFilter
, LowpassFilter
...) to figure out how to improve my data in some aspect (filtering noise, detecting outliers, detecting edges...). Two things have always bugged me when using the build-in filter functions:
filters expect simple list like
{y1,y2,y3,y4}
when (more often than not) measurement data is of the form{{x1,y1}, {x2, y2}, {x3, y3}, {x4, y4}}
where $x_i$ is some index (e.g. time or frequency) and $y_i$ is the respective measurement (e.g. voltage or force)filters have a syntax of the form
someFilter[data, parameters]
and not an operator formsomeFilter[parameters][data]
This leads often to a Kuddelmuddel of [[]]
mixed with a bunch of Transpose
and/or intermediate (global) variables
What is a stylistically good way to deal with this?