Repository navigation
Conversation
Lets phy open any recording SpikeInterface can load, given as a recording object, a provenance .json or a saved .zarr. A preprocessing chain over remote raw data can then be viewed without exporting it to a flat binary file first. Traces are read in fixed-size blocks with a small LRU cache, since computing a block of a preprocessed or remote recording is slow and phy reads overlapping windows. The recording sets the sample rate, channel count and dtype; values from params.py that disagree are reported, because phy computes trace windows from params.py. Loading works with spikeinterface 0.100 onward, where `load` replaced `load_extractor`.
The SpikeInterface reader imports spikeinterface only when used, so it stays optional for installs, as the `spikeinterface` extra. CI installs it through requirements-dev.txt so the reader's tests run instead of being skipped.
|
Thanks for adding this! Direct access through SpikeInterface will be useful, and the reader tests cover a lot. Could you add an integration test through |
Exercise relative provenance paths, lazy preprocessing, channel mapping,\nand waveform samples through params.py and TemplateModel. Add CI coverage\nfor the advertised SpikeInterface 0.100.0 minimum.
Exercise relative provenance paths, lazy preprocessing, channel mapping, and waveform samples through params.py and TemplateModel. Add CI coverage for the advertised SpikeInterface 0.100.0 minimum.
…nto feat/spikeinterface-reader-sync
|
Added All nine SpikeInterface tests in this PR pass on 0.100.0 and the current release. A new CI job checks 0.100.0 on Python 3.11. |
|
Thanks for adding this and for the integration and minimum-version coverage! All CI checks passed, and this is now merged. The phy follow-ups are open:
Both phy PRs link back here and test against the merged phylib revision. |
phy can only show traces from a flat binary or mtscomp file, so a SpikeInterface recording has to be exported before phy can display it. This adds a reader that opens the recording through SpikeInterface instead, so
dat_pathinparams.pycan point at a SpikeInterface provenance.json(fromrecording.dump_to_json()) or a saved SpikeInterface.zarr:The preprocessing chain is computed lazily, a 0.5 s block at a time with a small LRU cache, which lets phy show remote data without downloading it. Traces are raw and unscaled, like a
.dat. The sample rate, channel count and dtype come from the recording, and the reader warns ifparams.pydisagrees.SpikeInterface is an optional extra (
pip install phylib[spikeinterface]) and is imported only when one of these files is opened. Versions 0.100 and later work. I added it torequirements-dev.txtso the new tests run in CI.I'll follow up with a separate PR that prefetches the next block while scrolling.