Closed bryanwweber closed 7 years ago
Still need to figure out if smoothing is necessary (probably not) and test against a few first-stage cases.
It seems like the second-order Butterworth filter will be enough, no need for smoothing (which is essentially another low-pass filter). However, the optimal frequency determination is not always good enough, so need to add a way to specify the filter frequency and reprocess the data.
As an example of the previous comment, this is the result for a condition with a relatively short ignition delay. We can see the unphysical extreme drop just prior to ignition. This can be removed by increasing the filter frequency from the optimum of near 900 Hz to 5 kHz. For this case, the selection of the second frequency for the linear fit had to be adjusted as well.
Also need to make sure to record the actual filter frequency used. Also need to check the initial pressure - the portion near the beginning may need smoothing if pathological problems with V(0) are there.
http://nbviewer.jupyter.org/github/demotu/BMC/blob/master/notebooks/ResidualAnalysis.ipynb