Skip to content

Commit

Permalink
BUG: Fix bug with forward creation (#1014)
Browse files Browse the repository at this point in the history
  • Loading branch information
larsoner authored Oct 29, 2024
1 parent dbbbe24 commit aaab023
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docs/source/v1.10.md.inc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
1. Emptyroom files that lack cHPI channels will now be processed (for line noise only) instead of raising an error.
2. cHPI filtering is now performed before movement compensation.

- Fix bug where the ``config.proc`` parameter was not used properly during forward model creation (#1014 by @larsoner)

### :books: Documentation

- Choose the theme (dark of light) automatically based on the user's operating system setting (#979 by @hoechenberger)
Expand Down
10 changes: 9 additions & 1 deletion mne_bids_pipeline/steps/source/_04_make_forward.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,12 @@ def _prepare_trans_subject(
logger.info(**gen_log_kwargs(message=msg))

trans = get_head_mri_trans(
bids_path.copy().update(run=cfg.runs[0], root=cfg.bids_root, extension=None),
bids_path.copy().update(
run=cfg.runs[0],
root=cfg.bids_root,
processing=cfg.proc,
extension=None,
),
t1_bids_path=cfg.t1_bids_path,
fs_subject=cfg.fs_subject,
fs_subjects_dir=cfg.fs_subjects_dir,
Expand Down Expand Up @@ -138,6 +143,9 @@ def run_forward(
session: str | None,
in_files: dict,
) -> dict:
# Do not use processing=cfg.proc here because the forward could actually be
# influenced by previous steps (e.g., Maxwell filtering), so just make sure we
# use cfg.proc when figuring out the head<->MRI transform
bids_path = BIDSPath(
subject=subject,
session=session,
Expand Down

0 comments on commit aaab023

Please sign in to comment.