A function get_ch_positions for DigMontage
See original GitHub issueDescribe the new feature or enhancement
If I have an existing montage and want to add fiducials, there is currently no way to do that without calling make_dig_montage again. But the montage itself does not provide a way to get the ch positions.
Currently the only way I can find that gets a montage is either you make it from scratch make_dig_montage or you get it from raw using raw.get_montage. But if you say already have an existing montage via raw.get_montage() it seems you would have to hack out the channel positions and then call make_dig_montage again? Since there is no public API for getting the channel positions, I wonder if there’s an easier way around this?
Describe your proposed implementation
Possibly a get_ch_positions() public function for DigMontage, that one can then do:
montage = raw.get_montage()
ch_positions = montage.get_ch_positions()
Additional comments
TBD
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (11 by maintainers)
Top Results From Across the Web
mne.channels.DigMontage — MNE 1.2.2 documentation
Any coordinate frame can be transformed to head if the fiducials (i.e. LPA, RPA and Nasion) are defined. One can use this function...
Read more >BUG:mne.create_info function mismatch channel names with ...
create_info with DigMontage can not match channel names in a case insensitive manner. Steps to reproduce. import mne montage = mne.channels.
Read more >Channel positions are not present in DigMontage - MNE Forum
RuntimeWarning: DigMontage is only a subset of info. There are 4 channel positions not present in the DigMontage. The required channels are: ...
Read more >mne.channels.DigMontage — MNE 0.15.dev0 documentation
mne.channels.DigMontage¶ ... Montage for digitized electrode and headshape position data. ... Montages are typically loaded from a file using ...
Read more >Working with sensor locations - | notebook.community
DigMontage > contain sensor positions in 3D ( x , y , z , in meters), ... Raw object (see the documentation of...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

In that case we should just make it
get_positions(), and doingmon_2 = make_dig_montage(**mon.get_positions())should have all attributes ofmonandmon_2the same. If you want the channel positions you just usemon.get_positions()['ch_pos']That code operates on an info object. There is no info as part of DigMontage