Dear users

I have an fMRI dataset comprising 113 volumes (from a single run). I would like 
to map information about events during the fMRI run - experimental condition 
and onset time - to the dataset. The events structure is stored in a .txt file 
with four columns: run#, experimental condition, unique stimulus, and onset 
time. It looks something like this

0    Y    porch    12.030224
0    Y    victory    15.530834
0    P    kingdom    19.031396
0    Y    evening    22.531978

I've tried to map this info to the fMRI dataset in the following way:

bold_fname = 'path_to_fMRI_dataset'
exp_data = pd.read_csv("path_to_txt", delimiter='\t', header = None)
exp_data.columns = ['run','condition','word','onset']

ds = fmri_dataset(bold_fname, targets = None)
ds.sa.time_coords = exp_data.onset
ds.sa.targets = exp_data.condition


The problem with this is that there are more fMRI volumes than rows in the 
conditions.txt fie, hence I get the following error:

Name: onset, dtype: float64` (Value length [45] does not match the required 
length [113] of attribute 'time_coords'.)

Can anyone suggest a workaround? Thanks in advance for any advice!


---------------------------------------------------------

Lyam Bailey, B.Sc., M.Sc.

Doctoral Student

Department of Psychology & Neuroscience
Dalhousie University

_______________________________________________
Pkg-ExpPsy-PyMVPA mailing list
Pkg-ExpPsy-PyMVPA@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa

Reply via email to