help > RE: block-design onsets/durations
Aug 10, 2015  06:08 PM | Alfonso Nieto-Castanon - Boston University
RE: block-design onsets/durations
Dear Daniel,

There are several ways to minimize the "tediousness" of this task:

1) using the GUI. if many or all of your subjects share the same presentation order you can simply select all of those subjects simultaneously in the 'subjects' list and then enter the onset/duration information just once (and that will update simultaneously all of those subjects condition info)

2) using Project.Import. if you have already input this information in SPM (i.e. created first-level SPM.mat files containing your design info) you may use Projects.Import to load all those SPM.mat files (typically one SPM.mat file per subject or one SPMP.mat per subject and session) and CONN will read the condition names/onsets/durations from them (it will also read from these files the source of functional data, number of sessions per subject, acquisition TR, and any first-level covariates that you may have entered into those first-level design files). 

3) using batch scripts. if you are familiar with Matlab you may create a simple variable containing all of your condition onsets/durations and then load that into your CONN project using conn_batch. For example, if you have your project loaded in the CONN gui, and you have in Matlab two variables containing the onset/duration values for each condition/subject/session (i.e. onsets{ncond}{nsub}{nses} is a vector containing the onset times (in seconds) for every condition 'ncond', subject 'nsub' and session 'nses'), you could then simply use:

 clear batch;
 batch.Setup.conditions.names = {'taskA', 'taskB'};
 batch.Setup.conditions.onsets = onsets;
 batch.Setup.conditions.durations = durations;
 conn_batch(batch);

to load that information into your currently-open CONN project. 

Hope this helps


Originally posted by Daniel Yang:
Dear CONN developers,

I am using conn15.d and have 48 subjects. It is a bit tedious when I need to enter the onsets/durations manually for each subject and each condition.
Is it possible to copy/paste into the conn15.d interface? Or into the .mat file directly?

Alternatively, are there more BATCH examples I can find somewhere?

Many thanks!
Daniel Yang

Threaded View

TitleAuthorDate
Daniel Yang Aug 10, 2015
Sahil Bajaj Nov 11, 2019
Alfonso Nieto-Castanon Nov 12, 2019
Sahil Bajaj Nov 12, 2019
RE: block-design onsets/durations
Alfonso Nieto-Castanon Aug 10, 2015