ezmsg-org / ezmsg

Pure-Python DAG-based high-performance SHM-backed pub-sub and multi-processing pattern
https://ezmsg.readthedocs.io/en/latest/
MIT License
11 stars 5 forks source link

Bug: sigproc.Downsample loses tail on irregular-length messages resulting in uneven downsampling. #61

Closed cboulay closed 10 months ago

cboulay commented 10 months ago

Downsample should have a buffer to keep track of samples that were beyond the last even multiple of self.STATE.cur_settings.factor.

I can take care of this. First, a couple questions:

  1. Do we want Downsample to keep the first or last sample in each factor-sized block?
    • I think using the first is more consistent with the rest of ezmsg.
  2. Do we want to make proper buffering optional? And if yes, should it be the default? Or should the default be axis=='time'?
cboulay commented 10 months ago

I misunderstood how s_idx was working. I'll close for now because I think the implementation is correct.