Closed muschellij2 closed 1 year ago
Have you seen this https://stackoverflow.com/questions/40483518/how-to-real-time-filter-with-scipy-and-lfilter ?
You can get the internal state of the filter when calling lfilter and pass it back when running the next chunk.
I have not, but that seems promising, but I'd likely only want to read chunks of the CSV in at a time and then run that chunk and then aggregate the chunk.
So I have 8 days worth of 80Hz data, and it would be useful for memory-saving to be able to run some of this in chunks, but it's unclear how to break up the data to get the same result.
The recursive nature of the filtering doesn't make it easy for me to determine how to do it, including how the epoch/sample rate combination would affect how to chunk the data.
Is there any clear way to perform this operation, even if you need to pass in some of the previous data into the next chunk?