Skip to content

Commit a180d57

Browse files
authored
Merge pull request #5 from jshanna100/ic_load_raw
first commit, fix loading raw files for apply_ica
2 parents be1d361 + 60fe20c commit a180d57

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

mne_bids_pipeline/steps/preprocessing/_08a_apply_ica.py

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,25 @@ def get_input_fnames_apply_ica_raw(
9292
run: str,
9393
task: str | None,
9494
) -> InFilesT:
95-
in_files = _get_run_rest_noise_path(
96-
cfg=cfg,
95+
bids_basename = BIDSPath(
9796
subject=subject,
9897
session=session,
99-
run=run,
100-
task=task,
101-
kind="filt",
102-
mf_reference_run=cfg.mf_reference_run,
98+
task=cfg.task,
99+
acquisition=cfg.acq,
100+
recording=cfg.rec,
101+
space=cfg.space,
102+
datatype=cfg.datatype,
103+
root=cfg.deriv_root,
104+
check=False,
105+
extension=".fif",
103106
)
107+
in_files = dict()
108+
for run in cfg.runs:
109+
key = f"raw_run-{run}"
110+
in_files[key] = bids_basename.copy().update(
111+
run=run, processing=cfg.processing, suffix="raw"
112+
)
113+
_update_for_splits(in_files, key, single=True)
104114
assert len(in_files)
105115
in_files.update(_ica_paths(cfg=cfg, subject=subject, session=session))
106116
return in_files

0 commit comments

Comments
 (0)