You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I have several datasets based on micromed eeg files (scalp EEG, SEEG, ERP).
Do you think it could be possible to develop file readers for that format (TRC files), quite commonly used ?
thank you again for your nice software !
I also work with Micromed files from time to time. I wrote a reader that uses python3 and numpy, it is based on the fieldtrip Micromed reader.
Unfortunately as far as I understand it FieldTrip is GPL licensed and you cannot use a GPL implementation (FieldTrip) as a reference when adding an implementation to a BSD package (MNE-Python). You'd have to ask permission from the FieldTrip folks to relicence as BSD.
But if you manage to do that, it does sound like you're close to having a workable solution that we could add!
My reader is based on the fieldtrip reader in the sense that I used it to know how the data bytes are organized in the TRC files. The reader itself is quite simple and just goes through the file byte by byte sorting the data. I have no experience with Licensing but I would think that it is too simple for there to be any risk of Licensing infringement.
@robertoostenveld one of our users has translated the FieldTrip MicroMed file reader code into Python and is proposing to add it to MNE-Python. Requesting permission to re-license as BSD 3-clause.
Reacted by Stefan Appelhoff and Daniel Lachner-Piza
Using the original implementation to learn the file structure and byte order and using that to make a Python implementation would IMHO not constitute a translation. Asking ChatGPT to make a matlab-to-python translation would be. But if your code looks sufficiently dissimilar to that included in FieldTrip, I won't complain.
However, why not use the Neo implementation here? That is in Python and BSD licensed already. Or use that to learn how the file structure is, and then write your own. Nobody will be able to tell it apart from the version that you could have written based on the FieldTrip MATLAB code 😉.
Thank you @robertoostenveld for your suggestion, the micromed reader from Neo (this one) extracts more information from the files than the fieldtrip reader. It was actually helpful for my project to participate in this topic, I can extract the EEG date and time from the micromed files now!
Activity
welcome commentedon Apr 13, 2022
Hello! 👋 Thanks for opening your first issue here! ❤️ We will try to get back to you soon. 🚴🏽♂️
agramfort commentedon Apr 13, 2022
see this old discussion #1605
@jungju69 would you up for writing such a reader?
jungju69 commentedon Apr 13, 2022
agramfort commentedon Apr 13, 2022
sappelhoff commentedon Sep 1, 2022
or you could find a documentation of micromed's
.trcfile format and post it here, maybe someone in the future will implement this.Daniel-Lachner-Piza commentedon Oct 17, 2023
Hello MNE community,
I also work with Micromed files from time to time. I wrote a reader that uses python3 and numpy, it is based on the fieldtrip Micromed reader.
I'm not sure how you can integrate this reader into the MNE infrastructure, I could send you the script if this helps.
Done:
ToDo:
larsoner commentedon Oct 17, 2023
Unfortunately as far as I understand it FieldTrip is GPL licensed and you cannot use a GPL implementation (FieldTrip) as a reference when adding an implementation to a BSD package (MNE-Python). You'd have to ask permission from the FieldTrip folks to relicence as BSD.
But if you manage to do that, it does sound like you're close to having a workable solution that we could add!
Daniel-Lachner-Piza commentedon Oct 17, 2023
My reader is based on the fieldtrip reader in the sense that I used it to know how the data bytes are organized in the TRC files. The reader itself is quite simple and just goes through the file byte by byte sorting the data. I have no experience with Licensing but I would think that it is too simple for there to be any risk of Licensing infringement.
drammock commentedon Oct 17, 2023
Translations of code from one language to another are specifically mentioned in the GPL. https://www.gnu.org/licenses/gpl-faq.html#TranslateCode
@robertoostenveld one of our users has translated the FieldTrip MicroMed file reader code into Python and is proposing to add it to MNE-Python. Requesting permission to re-license as BSD 3-clause.
robertoostenveld commentedon Oct 20, 2023
I don't personally hold the copyright over the https://github.com/fieldtrip/fieldtrip/blob/master/fileio/private/read_micromed_trc.m code. It was given to me by researchers in Utrecht (their first names are mentioned in the code, I suspect https://www.umcutrecht.nl/en/research/researchers/van-steensel-mj is the original author - I could not find her on GitHub) and I suspect that they don't care too much how and where it gets reused.
Using the original implementation to learn the file structure and byte order and using that to make a Python implementation would IMHO not constitute a translation. Asking ChatGPT to make a matlab-to-python translation would be. But if your code looks sufficiently dissimilar to that included in FieldTrip, I won't complain.
However, why not use the Neo implementation here? That is in Python and BSD licensed already. Or use that to learn how the file structure is, and then write your own. Nobody will be able to tell it apart from the version that you could have written based on the FieldTrip MATLAB code 😉.
larsoner commentedon Oct 20, 2023
+1 for using Neo if it has what we want, we are doing something similar for Neuralynx data in #11969 which could be followed as a template
drammock commentedon Oct 20, 2023
thanks @robertoostenveld for the info and suggestions.
Daniel-Lachner-Piza commentedon Oct 24, 2023
Thank you @robertoostenveld for your suggestion, the micromed reader from Neo (this one) extracts more information from the files than the fieldtrip reader. It was actually helpful for my project to participate in this topic, I can extract the EEG date and time from the micromed files now!