How to create regressor for 1back tasks in beta weight estimation step?

How can I model one back task in GLM model fit in task based fmri. The dataset I am using have repitition of stimuli for one back task. How can I model the same in my GLM estimation. I am using nilearn for creating design matrix, and performing the analysis in Python entirely.

Hi @Satwick,

Have you looked through the nilearn examples? 8. Analyzing fMRI using GLMs - Nilearn You might also find this function helpful nilearn.glm.first_level.first_level_from_bids - Nilearn