Skip to content

Commit

Permalink
BUG: find alignvideo file by adding glob
Browse files Browse the repository at this point in the history
  • Loading branch information
jungheejung committed Aug 23, 2024
1 parent cbc5a87 commit ebc05b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spacetop_prep/events/bidsify_alignvideos_ENH.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ def alignvideo_format_to_bids(sub, ses, run, task_name, beh_inputdir, bids_dir):
--------
format2bids('sub-0001', 'ses-01', 'run-01', 'task-alignvideos', '/path/to/beh_data', '/path/to/bids_data')
"""
fpath = Path(beh_inputdir) / sub / 'task-alignvideos' / ses / f'{sub}_{ses}_task-alignvideos_{run}_beh.csv'
fpath = Path(beh_inputdir) / sub / 'task-alignvideo*' / ses / f'{sub}_{ses}_task-alignvideo*_{run}_beh.csv'
if not fpath.is_file():
# Attempt to find a temporary or alternative file
temp_fpath = Path(beh_inputdir) / sub / 'task-alignvideos' / ses / f'{sub}_{ses}_task-alignvideo*{run}*TEMP*.csv'
temp_fpath = Path(beh_inputdir) / sub / 'task-alignvideo*' / ses / f'{sub}_{ses}_task-alignvideo*{run}*TEMP*.csv'

if temp_fpath.is_file():
fpath = temp_fpath
Expand Down

0 comments on commit ebc05b1

Please sign in to comment.