Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Feb 10, 2025
1 parent 175a622 commit 9226b32
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 21 deletions.
40 changes: 24 additions & 16 deletions mne/report/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,17 @@ def _fig_to_img(


def _get_bem_contour_figs_as_arrays(
*, sl, n_jobs, mri_fname, surfaces, orientation, src, trans, show, show_orientation, width
*,
sl,
n_jobs,
mri_fname,
surfaces,
orientation,
src,
trans,
show,
show_orientation,
width,
):
"""Render BEM surface contours on MRI slices.
Expand Down Expand Up @@ -3626,21 +3636,19 @@ def _add_forward(
)

self._add_bem(
subject=subject,
subjects_dir=subjects_dir,
src=src,
trans=trans,
decim=1,
n_jobs=1,
width=512,
image_format=image_format,
title="source space",
section=section,
tags=tags,
replace=replace,
)


subject=subject,
subjects_dir=subjects_dir,
src=src,
trans=trans,
decim=1,
n_jobs=1,
width=512,
image_format=image_format,
title="source space",
section=section,
tags=tags,
replace=replace,
)

def _add_inverse_operator(
self,
Expand Down
10 changes: 5 additions & 5 deletions mne/viz/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
from ..fixes import _safe_svd
from ..rank import compute_rank
from ..surface import read_surface
from ..transforms import _frame_to_str, apply_trans
from ..transforms import apply_trans
from ..utils import (
_check_option,
_mask_to_onsets_offsets,
Expand Down Expand Up @@ -445,11 +445,11 @@ def _plot_mri_contours(
if src_["coord_frame"] != FIFF.FIFFV_COORD_MRI:
if trans is None:
raise ValueError(
"Source space must be in MRI coordinates, or "
"provide a trans.")
"Source space must be in MRI coordinates, or provide a trans."
)
else:
points = apply_trans(np.linalg.inv(trans['trans']), points)
sources.append(apply_trans(mri_rasvox_t, points* 1e3))
points = apply_trans(np.linalg.inv(trans["trans"]), points)
sources.append(apply_trans(mri_rasvox_t, points * 1e3))
sources = np.concatenate(sources, axis=0)

# get the figure dimensions right
Expand Down

0 comments on commit 9226b32

Please sign in to comment.