Repository navigation
Adding support for Nicolet .e files - #1750
MureziCapaul wants to merge 126 commits into
Conversation
|
Hi @MureziCapaul, sorry for the long silence here, and thanks for the nudges. I got back this and I've stubbed the file to a CI-friendly size and will put it on the I took a first pass and those are two comments: 1. Event/epoch times look like they come out scaled by the sampling rate. In 2. Small one in Neither is a big lift and the reader is clearly close. More to come, and thanks again for sticking with it. |
|
Hi @MureziCapaul, before I commit the test fixture to the One important thing: since The attached zip has two files, and it would help if you could look at both:
The Could you read both with the reader and confirm they come out correctly? Once you give the go-ahead I will commit |
|
Hi @h-mayorquin Thank you very much for taking the time to review the code and de-identify the files. I can read both files with my reader without a problem, and as far as I can tell there is no difference between them and the original file (except for what you already said). I think you can commit the I also fixed the two issues you mentioned, and commited the fixes to my fork. |
PR is up: As long as someone from our team takes a look and is merge you will be able to develop against them. I added a mulit-segment data there. |
|
I would prefer @apdavison and @JuliaSprenger to comment on this as regards the de-identification process as we recently had a meeting where (if I remember correctly) they had mentioned the rules for de-identification in Europe may be getting stricter. So before we merge the test file I would like them to comment. |
I took that discussion into account and applied the principles that @JuliaSprenger mentioned there. That is, the data is fully synthetic and basically just imitates in form the container of the original files and fills both the arrays and attributes with noise and placeholders. So, same dress but empty synthethic content. |
|
@MureziCapaul, the data is in our data repo. So if you could resolve conflicts and we can run tests again we can move forward with reviewing this. |
|
@zm711 , thanks for uploading the data. The tests now pass, so you may continue. |
h-mayorquin
left a comment
There was a problem hiding this comment.
Hi @MureziCapaul,
Thanks for fixing the two points from the last round (and for keeping this alive for more than a year, we just don't have a lot of human resources as you can see by the sate of the library but I try to keep it alive). I took a second pass and ran the reader against the three files on gin (scalp_eeg.e, multi_segment.e and intracranial_high_rate.e). The tests pass locally for me too. GitHub still shows conflicts with master though.
I added some inline comments and I have some general points:
- I would remove
_get_buffer_descriptionsand_get_analogsignal_buffer_description. The reader doesn't enable the buffer API (_has_buffer_description_apistaysFalse) so nothing uses them. And the description is not correct: the data is stored in per-channel sections and not as one(samples, channels)C-order block. I memmapped the description and it does not matchget_analogsignal_chunkin any of the three files, and forintracranial_high_rate.ethe described shape runs past the end of the file. _get_index_instancescatches every exception and returns a placeholder withoffset0. A missing section then gets read from the start of the file and produces garbage silently. I think it is better to throw an error, or to return an empty list and let the caller decide._get_analogsignal_chunkcalls_create_signal_channelson every read. That rebuilds the channel table, reassignsself.signal_streamsas a side effect and repeats the timestream warning on every read of segments 1 and 2 ofmulti_segment.e. Can this be computed once in_parse_header?- What is the use case for
set_signal_channels? neo assumes the channels are the same across segments, and a public method that rewritesheaderis easy to misuse. If files with different channels per segment exist, I would prefer to throw an error for now. - The timestream packets are matched to segments by position.
multi_segment.ehas one timestream packet for three segments, so every parse warnsNo timestream found for segment 1. The packets carry adate. Wouldn't matching by date be more accurate? - The dates are built with
tzinfo=timezone.utc, but the docstring of_convert_ole_to_datetimesays the timezone offset is already integrated. If the stored value is local time, labeling it UTC is wrong. Is it local time? - I compared
HC_EVENTwith the event types in the MATLAB reader. Three of them are missing here: Amplifier Disconnect, Amplifier Reconnect and Recording Paused. And 33 of the entries are not in the MATLAB code, some of them in German (Zaehneputzen,Kratzt,Anfall). How are you getting those? - The class docstring should say that the format is closed and that the reader is reverse-engineered from the MATLAB code, so users know what to expect.
Let me know if I am missing something.
Co-authored-by: Heberto Mayorquin <h.mayorquin@gmail.com>
Co-authored-by: Heberto Mayorquin <h.mayorquin@gmail.com>
Co-authored-by: Heberto Mayorquin <h.mayorquin@gmail.com>
…dicates a defective file
…between segments and the use case was changing signal channels between segments
…s and convert them to the correct overall channel id
…mbination to avoid splitting of streams
…id across all segments, and ignore the channels that changed between segments
|
Hi @h-mayorquin , I have addressed the inline-comments, sometimes with my own comment as well. Regarding the general issues:
I also noticed that the In summary, there is only the issue of how to handle the events? Do you want a large dictionary, or a large testing file (or 3 in our case)? I have the code to read the internal event key-value table in a branch, but not commited yet. |
The reader for .e files as mentioned in #1510