-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
In a few places within the package, events files are read in using pandas.read_csv, as below:
| timing = pd.read_csv(event_files[0], header=0, index_col=0, sep='\t') |
Setting index_col=0 means that the first column will be read in as the index, and in BIDS datasets that first column would generally be the "onset" column. Later, however, the "onset" column is directly referenced, but it won't be available since it'll be the index (see below).
IDConn/idconn/connectivity/build_networks.py
Line 132 in 5e9bc32
| blocks.append((cond_timing.loc[i]['onset'] / tr, ((cond_timing.loc[i]['onset'] + cond_timing.loc[i]['duration']) / tr) + 1)) |
I think the solution is to drop index_col=0 and header=0 from all read_csv calls targeting events files. Also, switching to read_table will let you drop sep="\t", so it would just be df = pd.read_table(events_file).
Metadata
Metadata
Assignees
Labels
No labels