-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
WIP: ENH: add support for legacy files *.elp, *.hsp #1001
Conversation
The resulting
|
cool! what can I do to help? |
I just don't know what the proper tolerance difference should be for the two. Since the operations should yield the same result, my old guess is there is a slight discrepancy that comes from the calculation of the norm when generating of the basis vectors in matlab versus python. |
the numerical error seem pretty large. You see errors at the second digit which is really weird for double precision computation. |
after looking into the coreg code in mne, I noticed that has changed a bit since it was originally written. the origin is being calculated as |
I don't know about the change, does the current code not result in the desired neuromag space? You could add a test comparing the points in raw.info after initializing a RawKIT with .txt files and initializing another one with corresponding .hsp and .elp? There you should get exactly the same results unless the code that produces hsp and elp files introduces inaccuracies |
There should be a note in the documentation clarifying that files are treated differently based on the extension. To avoid confusion it might be good to force other files to have the .txt extension? Also you might want to enforce that either both or none of the files are .txt, otherwise the files are in different coordinate systems. |
I think that the difference in how the origin is defined between the two is what is resulting in slightly different estimates.
In my preliminary checking, I found that that there was a difference in the points, and resultantly the dev_head_t.
+1 |
I looked through the ras-to-nm function (https://github.com/mne-tools/mne-python/blob/master/mne/coreg.py#L376) and as far as I can tell it implements the head coordinate system defined in the MNE manual (p. 97). If there are substantial numerical differences is it possible the elp/hsp files are not in the same coordinate system and still need to be transformed? |
It seems what you described first ( |
so it would explain why the points in the legacy files are slightly different. i think doing the transform on these points might be the best solution. when doing a test with this transform, it yields similar results (to the 5 decimal) for the elp but not for the headshape. I don't know what's happening. |
@christianmbrodbeck would you mind looking at this if you get a chance? the problem is that the same transform works for elp but not hsp. |
this has been lingering for a while. I will try to resolve this. @christianbrodbeck mind looking at this with me. there's something going wrong with the hsp file transform. |
33f3cd3
to
97d7b7d
Compare
Sorry I’m kind of swamped at the moment, is this very urgent? On Sep 24, 2014, at 9:47 , Teon [email protected] wrote:
|
no, no, it's not. :) I was just clearing my to-do list. |
Can we close this now? |
this is a different elp file but I think the use case is rather small. it is a format used by KIT software but it can be bypassed now directly with the polhemus digitizer data. I will close it and it can be reopened if there is a demand. |
Hey @teonbrooks OK if I take over? At UMD these files are actually the default, they're output by the pen-based digitizer. |
totally ok if you take it over. let me know if I can be of help |
@teonbrooks why are Cross ref #6461 |
the modern Polhemus export |
@christianmbrodbeck @TalLinzen
Added functionality to import *.elp and *.hsp.
Needs