Skip to content

Commit e26d3ab

Browse files
committed
first commit, fix loading raw files for apply_ica
1 parent be1d361 commit e26d3ab

File tree

1 file changed

+27
-6
lines changed

1 file changed

+27
-6
lines changed

mne_bids_pipeline/steps/preprocessing/_08a_apply_ica.py

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,36 @@ 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+
# this loads the raw file for filtered data; undesired if we did eyelink_sync or any other step inbetween
96+
# in_files = _get_run_rest_noise_path(
97+
# cfg=cfg,
98+
# subject=subject,
99+
# session=session,
100+
# run=run,
101+
# task=task,
102+
# kind="filt",
103+
# mf_reference_run=cfg.mf_reference_run,
104+
# )
105+
# do this instead
106+
bids_basename = BIDSPath(
97107
subject=subject,
98108
session=session,
99-
run=run,
100-
task=task,
101-
kind="filt",
102-
mf_reference_run=cfg.mf_reference_run,
109+
task=cfg.task,
110+
acquisition=cfg.acq,
111+
recording=cfg.rec,
112+
space=cfg.space,
113+
datatype=cfg.datatype,
114+
root=cfg.deriv_root,
115+
check=False,
116+
extension=".fif",
103117
)
118+
in_files = dict()
119+
for run in cfg.runs:
120+
key = f"raw_run-{run}"
121+
in_files[key] = bids_basename.copy().update(
122+
run=run, processing=cfg.processing, suffix="raw"
123+
)
124+
_update_for_splits(in_files, key, single=True)
104125
assert len(in_files)
105126
in_files.update(_ica_paths(cfg=cfg, subject=subject, session=session))
106127
return in_files

0 commit comments

Comments
 (0)