ezmsg.blackrock sends out its spike events as a smattering of EventMessage objects. These need to be wrangled into a common message for most processing methods.
A unit that is parameterized with a desired (e.g.) output_rate = 30_000. could construct a pydata.sparse buffer with "time" axis .gain of 1 / output_rate seconds. As events arrive, they are placed into this buffer and update self.last_write_time_idx.
A separate @ez.publisher task will grab a block from the buffer from last_read_time_idx until 1 frame before self.last_write_time_idx, update last_read_time_idx, then put the block into an AxisArray message and yield it.
ezmsg.blackrocksends out its spike events as a smattering ofEventMessageobjects. These need to be wrangled into a common message for most processing methods.A unit that is parameterized with a desired (e.g.)
output_rate = 30_000.could construct apydata.sparsebuffer with "time" axis.gainof1 / output_rateseconds. As events arrive, they are placed into this buffer and updateself.last_write_time_idx.A separate
@ez.publishertask will grab a block from the buffer fromlast_read_time_idxuntil 1 frame beforeself.last_write_time_idx, updatelast_read_time_idx, then put the block into an AxisArray message and yield it.