Intro
Hi I'm looking for someone with some experience to walk me through some questions I have regarding resampling (downsampling) in Python. Here is my problem: I have accelerometer data that comes in irregularly at 50Hz. Sometimes I get 50 samples a second, sometimes 1 every 3 seconds. I also get velocity data that comes in at 1Hz also fairly irregularly. My question is, how best to filter and align the data?
Problem
I have been using the pd.resample("1s").mean() and pd.resample("1s").last() methods to downsample/decimate my data. When using the .last() method I have been using a low pass filter with a cutoff of 0.5Hz prior to decimation. As far as I can tell, the .mean() acts as it's own low pass filter, but I'm not sure if this is correct as there should be a difference between using a moving average filter and then resampling vs resampling into 1 second bins and then taking the mean. I have seen in a lot of online dicussion people simple use pd.resample().mean() and that seems wrong to me.
Anyways, anyone with any insight would be greatly appreciated.
Cheers!