-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[draft] new reader for curry files, using curry-python-reader code #13176
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
base: main
Are you sure you want to change the base?
Conversation
Given that @CurryKaiser refused our offer to help them package up their reader for PyPI / conda-forge, I see two remaining options:
Personally I lean toward option 2. I say this because if we're going to try to support curry files, at a minimum we need to be able to fix bugs when they arise, and ideally we should be willing/able to incorporate new features that have high demand from our users ( |
hum... my first reaction is to push a version 0.1 of their package on pypi
and rely on this. Basically we maintain a fork and hope that the fork
changes are accepted upstream... it feels less hacky and they also have a
CI and some testing setup with test_data that I would not duplicate in
mne-python...
… Message ID: ***@***.***>
|
that indeed is less hacky than my approach to vendoring. I'd be OK with that outcome, though curious what @larsoner will think. |
I'm fine with that idea but it would be good to get some blessing/permission from them to do this |
xref to #12855 (comment) where I've asked for confirmation that Compumedics really doesn't want to be the packager and they're OK with us doing it. |
And nothing has changed, so all good from our side. Sorry we couldn't package it for you. And thank you for working on this! |
thanks @CurryKaiser ! ok, sounds like a plan.. I can start working on this again soon, if you give a go @agramfort @drammock @larsoner I guess the fork should live in the mne-tools org? I have the necessary rights to create it |
Yeah I think so |
I already made the fork |
ok, sounds like a plan.. I can start working on this again soon, if you
give a go @agramfort <https://github.com/agramfort> @drammock
<https://github.com/drammock> @larsoner <https://github.com/larsoner>Message
ID: ***@***.***>
+1
|
xref to mne-tools/curry-python-reader#1 |
i could need some guidance on 2 things:
a few other things to discuss:
|
p.s. and could you remind me how to switch off the CIs when pushing these early commits? |
Push commits with |
... for the cHPI stuff it's probably easiest to load a Neuromag raw FIF file with cHPI info and look at how the info is stored for example in For preload, since |
ok,
|
@CurryKaiser in another place you said you might be able to provide us with test files - could we perhaps get a small one with epoched recordings in it (format version shouldn't matter)? |
Could be that they were truncated, let me check. |
Ok, try these: |
thanks for the file @CurryKaiser |
@drammock @larsoner @agramfort currently related question: |
Yeah use |
see conda-forge PR: conda-forge/staged-recipes#29754 |
yikes, looks like the subject's nose is intersecting with the helmet surface! |
yeah, the nasion landmark definitely doesnt align with the sample subject's nasion :) |
just pushed the version with updated coil type and for you to make a call @larsoner :
on another note: |
Let's add a
I think there is a bug where the helmet surface is in the wrong place. If you look just at the MEG sensors (or plot with Can you paste a minimal example to reproduce the
I am not sure about these... can you browse through |
Does that mean that https://mne.tools/dev/auto_examples/visualization/meg_sensors.html#ctf is incorrect? Locally interacting with that 3D plot it looks OK (though I've not used a CTF system so just using instinct about what looks "reasonable") |
I think that one is okay... the sensors there look properly aligned with the helmet. I suspect the curry code modifies the MEG sensor coordinates or something -- at least compared to how we represent them when reading native files from the CTF system -- so then when we put the helmet in assuming the MEG sensors are in the same place, it's wrong. At least that's what I'm assuming is going on. Maybe a dumb question but are those CTF sensors? In the code we have |
yeah, i just used your minimal working example here unfortunately i've not really worked with MEG myself before :D
I reuse the legacy MNE code - it was hardcoded there. perhaps ppl can use curry software to save data from other MEG devices (maybe that's what these rf,dc testfiles are), but not sure we can really cater for that:
code wise, i guess it is possible to let ppl specify the MEG device via input argument, but really not sure if this a plausible scenario.. |
re: rfDC test files:
ok - these files were uploaded by @DiGyt in 2019 - he seems to be the author of most our legacy curry code. can you also have a look at the also fyi, on my system the legacy code and my new reader version produce identical (distorted) plots for the files that i checked and that both can read. unfortunately it wont work for you, as the rfdc files cannot be read by if you replace the header file of the rfDC testfile with this version it should work (i stripped away the surplus channels that are not in the binary file): |
implemented |
In this case, we should change the coil type to a compumedics one and consider it a bugfix probably. I'll take a look and probably push a commit... |
Okay changing the coil type (commit pushed) and putting in a plausible Code
![]()
@dominikwelke it seems like these test files are probably incorrect... you want to push a fix to I think that's all you asked about but let me know if I missed something @dominikwelke ! |
great, thats looking much better.. thanks! |
this is what i asked so far, but now that this seems fixed i have two more API questions @larsoner @drammock -
this only works with curry 7 format, and the name is suboptimal as newer curry files don't have a .dat extension (plus .dat is pretty generic, anyway). shall we deprecate |
The lowest-effort solution (for us and users) is to mark |
Another option instead of deprecating is using our |
I think it makes sense to use the
i just wanted to flag that again @larsoner @drammock now we maintain the curryreader ourselves and already fixed quite a few things that are not merged upstream. |
let's focus first on getting it working, even if it's inefficient / slow. Adding |
hi all
as discussed in #13033 here a draft PR to use the official curry reader code.
in a first step i just use the reader as a module (only fixed formatting to force it past pre-commit).
it has some drawbacks (e.g. data is always loaded) and i did not implement all possible data yet (eg hpi, or epoched recordings) but in general it already works pretty well. tested it with all their example data, and one of my own recordings that didnt work in mne before.
it would be great to get some feedback how you want me to proceed with this @drammock @larsoner:
BACKGROUND:
the curry data reader currently cant handle all/newer curry files
plan is port code from the official curry reader into mne-python
for permission see #12855
closes #12795
closes #13033
closes #12855