Skip to content
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

Solving issue #13122: Aiming to achieve better sensitivity of head movement detection for chpi extraction #13123

Merged
merged 5 commits into from
Feb 26, 2025
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/changes/devel/13122.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed CTF cHPI coil location detection in :func:`mne.chpi.extract_chpi_locs_ctf` by :newcontrib:`Shresth Keshari`.
1 change: 1 addition & 0 deletions doc/changes/names.inc
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@
.. _Senwen Deng: https://snwn.de
.. _Seyed Yahya Shirazi: https://neuromechanist.github.io
.. _Sheraz Khan: https://github.com/SherazKhan
.. _Shresth Keshari: https://github.com/shresth-keshari
.. _Shristi Baral: https://github.com/shristibaral
.. _Silvia Cotroneo: https://github.com/sfc-neuro
.. _Simeon Wong: https://github.com/dtxe
Expand Down
2 changes: 1 addition & 1 deletion mne/chpi.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def extract_chpi_locs_ctf(raw, verbose=None):

# find indices where chpi locations change
indices = [0]
indices.extend(np.where(np.all(np.diff(chpi_data, axis=1), axis=0))[0] + 1)
indices.extend(np.where(np.any(np.diff(chpi_data, axis=1), axis=0))[0] + 1)
# data in channels are in ctf device coordinates (cm)
rrs = chpi_data[:, indices].T.reshape(len(indices), 3, 3) # m
# map to mne device coords
Expand Down
Loading