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
This issue is to keep track of the remaining Digitization PRs. It reflects a conversation with @larsoner.
TODO (each item will be a separate PR):
Add move all montage use to Raw and Epochs readers that have montage argument to call only the following at the end of their __init__, not used anywhere else (Add montage parameter to BaseRaw #6462):
Some refactor of mne/_digitization. We have all _make_dig_{kit, artemist, bti} that overlap with DigMontage.
deprecate read_dig_montage in favor of read_dig_montage_FOO or make_dig_montage(np.arrays..). No transforms allowed.
deprecate DigMontage.dev_head_t in favor of:
Storing the 2 versionsof the HPI points in the DigMontage.dig: one in FIFFV_COORD_HEAD and the other in FIFFV_COORD_MEG.
When you want dev_head_t, call DigMontage.get_dev_head_t() and it will compute it from these directly.
a free function returning a proper transformation: def compute_dev_head_t(dig: Digitization) -> Transform:
rename elp, hpi in favor of the new names (hpi, hpi_dev) in the internal calls. (I'm not sure this will be needed. We'll see)
DigMontage.transform_to_head() (not fully clear but it will get more clear when addressing the others). Things that could require:
a free function like: def get_fiducials(dig: Digitization) -> Fiducials: (Fiducials is a Bunch with nasion, lpa, rpa or similar, named tuple whatever.)
do all points need to be in 'head' or only some of them?
does it need to be a method? (probably yes)
remove fit_match_points outside of coreg.
move read_dig_XXXX to mne/io/
Add plot() to Digitization class WIP: Add plot method to digitization #6412. 3D plot with each dig point, maybe symbol based on coordinate frame (sphere=head, cube=meg, ... ?) and color based on type (eeg, extra, hpi, we have colors for these in defaults.py or plot_alignment somewhere) Fix the DigMontage-Montage mess we had in the existing plot with point_names and custom transforms. ([RFC] Are we aiming to be able to write plot_montage like this? #6649, maybe different PR)
Here is a summary of the readers with respect to how they are tested. Main focus: does the reader go through _test_raw_reader? has the reader been tested with digitization or None? Does the reader have digitization or a montage?
| _test_raw_reader | None | Digitization | other |
-----------------------+------------------+------+--------------+---------+
RawArray | x | x |||
read_raw_artemis123 | x || x ||
read_raw_bdf |||| montage |
read_raw_brainvision | x | x | x ||
read_raw_bti | x | x | x ||
read_raw_cnt | x | x || montage |
read_raw_ctf | x || x ||
read_raw_edf | x | x | x ||
read_raw_eeglab | x || x ||
read_raw_egi | x | x || montage |
read_raw_eximia | x | x || ------- |
read_raw_fieldtrip |||| ------- |
read_raw_fif | x || x ||
read_raw_gdf | x | x || montage |
read_raw_kit | x | x | x ||
read_raw_nicolet | x | x || montage |
This issue is to keep track of the remaining Digitization PRs. It reflects a conversation with @larsoner.
TODO (each item will be a separate PR):
Add move all
montageuse to Raw and Epochs readers that havemontageargument to call only the following at the end of their__init__, not used anywhere else (Add montage parameter to BaseRaw #6462):Deprecate
montageargument in all readers that supportmontagearguments ([MRG] Deprecate montage param from all EEG raw readers #6534)Replicate montage and digmontage usecases withThis no longer applies. We keptDigitizationDigMontage, removeMontageand makedigitizationprivate.DigMontageto useDigitization+ch_namesas representation (+ deprecate things that we no longer want to support) (MNT: Change DigMontage representation to use Digitization #6639)digitizationmodule private_digitization(Make mne/digitization private mne/_digitization #6700)DigMontage.save(savesdigbut notch_names)DigMontage()without parmeters.DigMontagetests. All that we did not change in MNT: Change DigMontage representation to use Digitization #6639 because we only wanted to touch code logic not test logic.set_montagetakes onlyDigMontagenotMontagemne/_digitization. We have all_make_dig_{kit, artemist, bti}that overlap withDigMontage.read_dig_montagein favor ofread_dig_montage_FOOormake_dig_montage(np.arrays..). No transforms allowed.DigMontage.dev_head_tin favor of:DigMontage.dig: one inFIFFV_COORD_HEADand the other inFIFFV_COORD_MEG.When you want
dev_head_t, callDigMontage.get_dev_head_t()and it will compute it from these directly.def compute_dev_head_t(dig: Digitization) -> Transform:elp,hpiin favor of the new names (hpi,hpi_dev) in the internal calls. (I'm not sure this will be needed. We'll see)DigMontage.transform_to_head()(not fully clear but it will get more clear when addressing the others). Things that could require:def get_fiducials(dig: Digitization) -> Fiducials:(Fiducialsis aBunchwithnasion,lpa,rpaor similar, named tuple whatever.)remove fit_match_points outside of coreg.
move
read_dig_XXXXtomne/io/AddFix theplot()toDigitizationclass WIP: Add plot method to digitization #6412. 3D plot with each dig point, maybe symbol based on coordinate frame (sphere=head, cube=meg, ... ?) and color based on type (eeg, extra, hpi, we have colors for these indefaults.pyorplot_alignmentsomewhere)DigMontage-Montagemess we had in the existing plot withpoint_namesand custom transforms. ([RFC] Are we aiming to be able to write plot_montage like this? #6649, maybe different PR)Make a none smoke test for applied transforms Reveal missing test massich/mne-python#31 (I've close it by error, it still applies)
Log of past PRs:
Cross-reference issues:
Here is a summary of the readers with respect to how they are tested. Main focus: does the reader go through
_test_raw_reader? has the reader been tested withdigitizationorNone? Does the reader have digitization or amontage?other notes: