How to concatenate several neuropixels recording from SpikeGLX, especially the ap.meta, nidq.bin and nidq.meta file?
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Documentation
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- python
- Domain
- data, documentation
Research direction
Start by reading the reported use of concatenate_recordings, read_spikeglx, read_binary, and phase_shift, along with the ap.meta and nidq.meta examples in the issue. Determine whether the supported concatenation workflow and metadata handling can be documented, including how absolute timestamps and gaps should be represented; done means a clear reproducible procedure for loading the resulting recordings.
Written by the indexing model from the issue text.
Description
Hi there,
I have used spikeInterface to concatenate three sessions recorded in the same day using NPX2 via SpikeGLX.
But I am a bit clue less about how to handle the ap.meta file.
I have tried to load the concatenated ap.bin file via read_spikeglx, but the traces looks quite weird.
If I use read_binary instead, the concatenated traces looks identical when I load the first trial of the recording using read_spikeglx.
There are some gap of time between each recordings, I manually save the ap.meta file by changing the
I want to keep the firstSample in the concatenated file as the same as in the first recording, so I can have absolute timestamps for all the recording, and for later synchronize with behavior cameras.
I applied phaseshift for each raw recording ap.bin file before concatenation.
rec = spre.phase_shift(rec)
tr02_HC
fileSizeBytes: 35,800,368,450
fileTimeSecs: 1549.7995
firstSample: 149,507,283
tr03_OF
fileSizeBytes: 28,292,999,350
fileTimeSecs: 1224.8051666666668
firstSample: 199,523,031
tr05_HC
fileSizeBytes: 30,213,765,890
fileTimeSecs: 1307.9552333333334
firstSample: 282,583,158
Based on theses, I manually changed the number for the ap.meta
concatenated_session
fileSizeBytes=94062180096
fileTimeSecs=4071.955833
firstSample=149507283
Which is in accordance with the actual size and duration of the concatenated recording ap.bin
concatenated_rec = si.concatenate_recordings(rec_list)
I also want to know how to deal with nidq.ap and nidq.meta for the concatenated sessions.
Unlike CatGT, those files seems not generated automatically in SpikeInterface.
I couldn't find the documentations for construct the concatenated ap.meta file in SpikeInterface, and will appreciate any suggestion and advices.
When I plot the traces of the concatenated recording after load it using read_spikeglx, it looks like this:
But if I use read_binary, the trace looks like this:
And if I use read_spikeglx for the first recording, the traces looks like this:
- Dominant language
- Python
- Stars
- 855
- Forks
- 280
- Avg merge
- 3d 32m
- Merged PRs (30d)
- 39
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from SpikeInterface/spikeinterface
-
testing
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
SpikeInterface/spikeinterface#4756 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
SpikeInterface/spikeinterface#4510 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 32/100
SpikeInterface/spikeinterface#4816 ·
Maintainers usually reply within 1 day
-
GatherToNpy/Zarr could pre-allocate stores when number of spike is knownPossibly taken @samuelgarcia claimed this 4 days ago. Openperformance
Difficulty 4/5 3-5 days Newbie friendliness 55/100
SpikeInterface/spikeinterface#4787 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
SpikeInterface/spikeinterface#4781 · 1 comment ·
Maintainers usually reply within 1 day
All issues in SpikeInterface/spikeinterface
Similar issues
-
tool-calling
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
vllm-project/vllm#59838 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
raullenchai/Rapid-MLX#4042 ·
Maintainers usually reply within 1 day
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 92/100
transitmatters/mbta-slow-zone-bot#70 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
litestar-org/advanced-alchemy#811 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day