Skip to content

Commit

Permalink
Update glm_base.py
Browse files Browse the repository at this point in the history
In SensorMaxStatPerm, the data dim_labels are now adapted in correspondence with the data.
  • Loading branch information
matsvanes authored Dec 19, 2023
1 parent 66b2ccc commit 6377ed7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions osl/glm/glm_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@ def __init__(self, glmsp, gl_con, fl_con=0, nperms=1000,
self.perm_data = glmsp.get_fl_contrast(fl_con)
self.perm_data.data = np.swapaxes(self.perm_data.data, 1, 2)

# change the dim_labels to match the data (swap time and channels, and remove firstlevel contrast)
self.perm_data.info['dim_labels'] = [self.perm_data.info['dim_labels'][i] for i in [0,3,2]]

self.gl_con = gl_con
self.fl_con = fl_con
self.gl_contrast_name = glmsp.contrast_names[gl_con]
Expand Down

0 comments on commit 6377ed7

Please sign in to comment.