@@ -67,6 +67,13 @@ def get_input_fnames_sync_eyelink(
6767 subject : str ,
6868 session : str | None ,
6969) -> dict :
70+
71+ # Get from config file whether `task` is specified in the et file name
72+ if cfg .et_has_task == True :
73+ et_task = cfg .task
74+ else :
75+ et_task = None
76+
7077 bids_basename = BIDSPath (
7178 subject = subject ,
7279 session = session ,
@@ -83,7 +90,7 @@ def get_input_fnames_sync_eyelink(
8390 et_bids_basename = BIDSPath (
8491 subject = subject ,
8592 session = session ,
86- task = cfg . task ,
93+ task = et_task ,
8794 acquisition = cfg .acq ,
8895 recording = cfg .rec ,
8996 datatype = "beh" ,
@@ -93,11 +100,10 @@ def get_input_fnames_sync_eyelink(
93100 extension = ".asc" ,
94101 )
95102
96-
97103 et_edf_bids_basename = BIDSPath (
98104 subject = subject ,
99105 session = session ,
100- task = cfg . task ,
106+ task = et_task ,
101107 acquisition = cfg .acq ,
102108 recording = cfg .rec ,
103109 datatype = "beh" ,
@@ -117,16 +123,20 @@ def get_input_fnames_sync_eyelink(
117123
118124
119125 key = f"et_run-{ run } "
120- in_files [key ] = et_bids_basename .copy ().update (
121- run = run
122- )
123- _update_for_splits (in_files , key , single = True ) # TODO: Find out if we need to add this or not
126+ in_files [key ] = et_bids_basename .copy ()
127+
128+ if cfg .et_has_run :
129+ in_files [key ].update (run = run )
130+
131+ # _update_for_splits(in_files, key, single=True) # TODO: Find out if we need to add this or not
124132
125133 key = f"et_edf_run-{ run } "
126- in_files [key ] = et_edf_bids_basename .copy ().update (
127- run = run
128- )
129- _update_for_splits (in_files , key , single = True ) # TODO: Find out if we need to add this or not
134+ in_files [key ] = et_edf_bids_basename .copy ()
135+
136+ if cfg .et_has_run :
137+ in_files [key ].update (run = run )
138+
139+ # _update_for_splits(in_files, key, single=True) # TODO: Find out if we need to add this or not
130140
131141 return in_files
132142
@@ -341,6 +351,8 @@ def get_config(
341351 cfg = SimpleNamespace (
342352 runs = get_runs (config = config , subject = subject ),
343353 remove_blink_saccades = config .remove_blink_saccades ,
354+ et_has_run = config .et_has_run ,
355+ et_has_task = config .et_has_task ,
344356 sync_eventtype_regex = config .sync_eventtype_regex ,
345357 sync_eventtype_regex_et = config .sync_eventtype_regex_et ,
346358 sync_heog_ch = config .sync_heog_ch ,
0 commit comments