This code also gives me data(with no eror), I get 1 million values more than I should get.
My question is: Is there a method to obtain the actual amount of Float32 values inside the binary file?
I mean beside increasing the dims value until I get an end of file error.
Are you sure the file is unstructured like that? Usually this kind of data can have all kinds of metadata embedded in the file. @jrevels works a lot with EEG data, maybe he can point you in the right direction.
Thank you @Keno, This file actually is composed of three files, one binary and two with metadata(sampling frequency, number of channels ,etc). My problem is that it seems to have more data than expected.
Would you think would be appropriate to contact @jrevels directly??
(I guess using Discourse tools, I have never done it before)
Discourse will have emailed him, so he can chime in here if he knows something. Usually messaging people directly is discouraged, as it prevents other people from seeing an answer which may be useful to them (aside from any etiquette questions).
Maybe you won’t believe this, but I was praying for you to come… Thank you.
It is BrainVision’s file, the .eeg file. I read (in a text editor) the metadata files, but I get the situation described above.
In fact, I would like to code something to read this format, and I was also thinking of contacting you to know if it could be added to you Neuro Julia projects.
I mean, if you think it is appropriate, I am just a beginner but with a couple of comments I would love to do it.
I haven’t worked with BrainVision’s format directly (@Zach_Christensen would be a better bet there - IIRC BIDS adopted the BrainVision format) but these links could be helpful:
It would definitely be within the scope of JuliaNeuroscience. The first thing would be to find out how they specify basic channel information in the header. For example, biosemi has this specification Biosemi EEG ECG EMG BSPM NEURO amplifiers systems
I’d start by importing it as a vector of 257 channels where each channel is a vector of floats. Usually that’s enough to get you to a productive work flow. Create some basic tests to ensure that your code still loads data properly as you improve on the whole IO process.
Try not to worry too much about doing things the “correct” way at first. If you ping me on GitHub I can help you out with getting basic traits working. They aren’t difficult but I’m very behind on documenting code right now (can you believe my PI wants me to publish papers instead of code documentation😉).