Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

automatic setting of number of channels #11

Closed
petersaj opened this issue Apr 28, 2016 · 4 comments
Closed

automatic setting of number of channels #11

petersaj opened this issue Apr 28, 2016 · 4 comments

Comments

@petersaj
Copy link

Marius' note:

It needs to know how many total channels there are so it loads them correctly from the bin file. In the past I left this as a user-defined option because there were cases where we ran it without a prb file.... But I think these days the prb file is a requirement for loading into Phy, so it needs to be made for any type of probe anyway. So I should really just determine the number of channels from the prb file.

@nsteinme
Copy link
Collaborator

Another option here is to make the input data file type be an NPY file
rather than flat binary. This file type contains a tiny header which
specifies the data size and type. It can be memory mapped and "fread" (by
just skipping the header first). I believe an existing data file can be
converted to NPY by concatenating a file of the header with the data file;
I need to test this more.

So that option is nicer because it is self-contained - if we want to go
that way it would be best to do it in coordination with Cyrille and phy so
you can use the same raw data file for both. Simply using the same
params.py file that phy uses is definitely the simpler option.

On Thu, Apr 28, 2016 at 12:33 PM, petersaj notifications@github.com wrote:

Marius' note:

It needs to know how many total channels there are so it loads them
correctly from the bin file. In the past I left this as a user-defined
option because there were cases where we ran it without a prb file.... But
I think these days the prb file is a requirement for loading into Phy, so
it needs to be made for any type of probe anyway. So I should really just
determine the number of channels from the prb file.


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#11

@marius10p
Copy link
Collaborator

Thanks Nick, but just making the NPY file out of a binary might take a significant amount of time. On top of that, memory mapping in matlab works significantly worse than just reading a flat binary file, I have noticed recently.

@nsteinme
Copy link
Collaborator

In linux the concatenation is immediate. But I'm struggling to get it to
work on windows, so we can forget it for now.

Fwiw, you can of course still just read the npy file with fread in matlab,
you just have to skip the header (usually 80 bytes) first.

On Thu, Apr 28, 2016 at 1:04 PM, marius10p notifications@github.com wrote:

Thanks Nick, but just making the NPY file out of a binary might take a
significant amount of time. On top of that, memory mapping in matlab works
significantly worse than just reading a flat binary file, I have noticed
recently.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#11 (comment)

@marius10p
Copy link
Collaborator

The number of active and total channels is now read from the channel map file, unless already specified in ops. Same goes for sampling frequency.

lshaheen pushed a commit to LBHB/KiloSort that referenced this issue Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants