VU-Cog-Sci / nideconv

fit response shapes from signal time-courses
MIT License
12 stars 11 forks source link

Within-run variance and t-value estimates #8

Closed MichlF closed 5 years ago

MichlF commented 5 years ago

Newest pull has get_t_value_timecourses method: That method does return values of variables that were manually added before the running the GroupResponseFitter but does not return their column labels. get_timecourses method in contrast does that.

Example: df is 2D fMRI data

df['run'] = 1
df['subject'] = 1
g_model = nideconv.GroupResponseFitter(df, design, 1/TR, concatenate_runs=False, confounds=confounds_all)
# I added some events here
tc_t = g_model.get_t_value_timecourses()
tc_t.head()

Picture1Pic1: Notice how instead of column/indices for run and subject on the left hand side, there are just blanks above the values. Picture2Pic2: The same for retrieving normal PSC timecourse when doing g_model.get_timecourses()

Setting the indices manually like so tc_t.index.names = ['subject', 'run', 'event type', 'covariate', 'time'] fixes it. But I guess it would still be better if the function sets the index for you in the proper way.