Skip to content

Commit

Permalink
[DOC] Improve doc format and x-ref related to coordinate transformati…
Browse files Browse the repository at this point in the history
…on (#11140)

* improve formatting

* more transform-related doc improvements [skip azp] [skip actions]
  • Loading branch information
Mathieu Scheltienne authored Sep 7, 2022
1 parent b8ba02f commit cf235d5
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
6 changes: 3 additions & 3 deletions mne/channels/montage.py
Original file line number Diff line number Diff line change
Expand Up @@ -1562,14 +1562,14 @@ def compute_dev_head_t(montage):
Parameters
----------
montage : instance of DigMontage
The DigMontage must contain the fiducials in head
montage : DigMontage
The `~mne.channels.DigMontage` must contain the fiducials in head
coordinate system and hpi points in both head and
meg device coordinate system.
Returns
-------
dev_head_t : instance of Transform
dev_head_t : Transform
A Device-to-Head transformation matrix.
"""
_, coord_frame = _get_fid_coords(montage.dig)
Expand Down
4 changes: 2 additions & 2 deletions mne/io/kit/coreg.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ def _set_dig_kit(mrk, elp, hsp, eeg):
-------
dig_points : list
List of digitizer points for info['dig'].
dev_head_t : dict
A dictionary describe the device-head transformation.
dev_head_t : Transform
A dictionary describing the device-head transformation.
hpi_results : list
The hpi results.
"""
Expand Down
6 changes: 3 additions & 3 deletions mne/io/meas_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ class Info(dict, MontageMixin, ContainsMixin):
comps : list of dict
CTF software gradient compensation data.
See Notes for more information.
ctf_head_t : dict | None
ctf_head_t : Transform | None
The transformation from 4D/CTF head coordinates to Neuromag head
coordinates. This is only present in 4D/CTF data.
custom_ref_applied : int
Expand All @@ -428,10 +428,10 @@ class Info(dict, MontageMixin, ContainsMixin):
average reference to be set.
description : str | None
String description of the recording.
dev_ctf_t : dict | None
dev_ctf_t : Transform | None
The transformation from device coordinates to 4D/CTF head coordinates.
This is only present in 4D/CTF data.
dev_head_t : dict | None
dev_head_t : Transform | None
The device to head transformation.
device_info : dict | None
Information about the acquisition device. See Notes for details.
Expand Down
2 changes: 1 addition & 1 deletion mne/preprocessing/artifact_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ def compute_average_dev_head_t(raw, pos):
Returns
-------
dev_head_t : array
dev_head_t : array of shape (4, 4)
New trans matrix using the averaged good head positions.
"""
sfreq = raw.info['sfreq']
Expand Down
7 changes: 4 additions & 3 deletions mne/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,15 @@ class Transform(dict):
The starting coordinate frame. See notes for valid coordinate frames.
to : str | int
The ending coordinate frame. See notes for valid coordinate frames.
trans : array-like, shape (4, 4) | None
trans : array of shape (4, 4) | None
The transformation matrix. If None, an identity matrix will be
used.
Notes
-----
Valid coordinate frames are 'meg','mri','mri_voxel','head','mri_tal','ras'
'fs_tal','ctf_head','ctf_meg','unknown'
Valid coordinate frames are ``'meg'``, ``'mri'``, ``'mri_voxel'``,
``'head'``, ``'mri_tal'``, ``'ras'``, ``'fs_tal'``, ``'ctf_head'``,
``'ctf_meg'``, ``'unknown'``.
"""

def __init__(self, fro, to, trans=None): # noqa: D102
Expand Down

0 comments on commit cf235d5

Please sign in to comment.