Skip to content

Commit

Permalink
allow emptyroom match to vary by session (mne-tools#976)
Browse files Browse the repository at this point in the history
  • Loading branch information
drammock authored Jul 31, 2024
1 parent ea5545d commit 9e256fb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
2 changes: 2 additions & 0 deletions docs/source/v1.10.md.inc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

### :bug: Bug fixes

- Empty room matching is now done for all sessions (previously only for the first session) for each subject. (#976 by @drammock)

- When running the pipeline with [`mf_filter_chpi`][mne_bids_pipeline._config.mf_filter_chpi] enabled (#977 by @drammock and @larsoner):

1. Emptyroom files that lack cHPI channels will now be processed (for line noise only) instead of raising an error.
Expand Down
21 changes: 10 additions & 11 deletions mne_bids_pipeline/steps/init/_02_find_empty_room.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,16 +128,15 @@ def main(*, config) -> None:
# in parallel.
logs = list()
for subject in get_subjects(config):
run = get_mf_reference_run(config=config)
logs.append(
find_empty_room(
cfg=get_config(
config=config,
),
exec_params=config.exec_params,
subject=subject,
session=get_sessions(config)[0],
run=run,
for session in get_sessions(config):
run = get_mf_reference_run(config=config)
logs.append(
find_empty_room(
cfg=get_config(config=config),
exec_params=config.exec_params,
subject=subject,
session=session,
run=run,
)
)
)
save_logs(config=config, logs=logs)

0 comments on commit 9e256fb

Please sign in to comment.