catalystneuro / mease-lab-to-nwb

MIT License
3 stars 2 forks source link

Concatenating multiple dual-recordings with different probes #41

Closed ross-folkard closed 3 years ago

ross-folkard commented 3 years ago

Not so much that I'm getting errors, just that I'm trying to concatenate 6 smrx files and split each one into H3 probe and H5.

image

Currently I seem to have managed the complete opposite and am wondering if one of you guys might be able to assist with how I could rearrange?

Many thanks in advance!

Ross

p.s. am very happy to talk over zoom/skype etc if this might solve things more quickly

alejoe91 commented 3 years ago

Hi @rf13734

So each recordign contains both H3 and H5 data? And to be clear, you want to concatenate all in time, but then split them by probe?

What you are doing in the attached snippet is two separate and unrelated concatenations: first in time, then in channels (using the same recordings list), so this make the 2 concatenations completely independent.

If the same file contains both probe, then you have to create a .prb file with 2 channel groups (one for H3 and one for H5). Then you can concatenate in time MultiRecordingTimeExtractor and finally load the probe file (which will apply to all concatenated recordings).

Instead, if out of the 6 files you have 3 H3 and 3 H5 probes the approach will be different. You first need to concatenate by channel each of the 3 pairs of recordings (H3-H5 - these need to have the same number of frames). This will result in 3 MultiChannelRecordingExtractors with 2 groups each. Then you can proceed with the time concatenation.

Is that clear? :)

ross-folkard commented 3 years ago

@alejoe91 Yes each recording contains both H3 and H5. Exactly, concatenate in time, and split by probe.

Thanks for the reply, I think it's clear. I'll give it a go!

Best

Ross

alejoe91 commented 3 years ago

Great! Feel free to close the issue then :)