-
Notifications
You must be signed in to change notification settings - Fork 1
Stream reference
aa4 builds a precise description of what data is needed by each module, and what outputs it produces. It does this using the concept of "streams". In a module's .xml file, it specifies what inputs it needs like this:
<inputstreams>
<stream>epi</stream>
</inputstreams>It then specifies its outputs like this
<outputstreams>
<stream>realignment_parameter</stream>
<stream>meanepi</stream>
<stream>epi</stream>
</outputstreams>structfn=aas_getfiles_bystream(aap,subjnum,'structural');
They then specify their outputs using lines like this:
aap=aas_desc_outputs(aap,subjnum,'structural',newstructfn);
You may not always want the input stream to come from the last module that output it. Sometimes, for example, you might want to get the epis from an earlier stage, or to compare the epis before and after a given stage.
You may now set up more complex pipelines by qualifying inputs to a module in the xml (or programatically) like this:
<inputstreams>
<stream>aamod_realign00001.epi</stream>
</inputstreams>| Stream name | Description | Input to, e.g., | Output from, e.g., |
| epi | fMRI data - many EPI volumes | aamod_realign | aamod_realign |
| structural | anatomical image | aamod_norm_noss | aamod_norm_noss |
| realignment_parameter | text file containing motion estimates | aamod_firstlevel_model | aamod_realign |
| meanepi | mean epi | aamod_coreg_noss | aamod_realign |
Streams may contain be input and output by many modules. The "epi" data, for example is passed along through all of the modules in the preprocessing. It changes in form along the way - being motion corrected, for example, or normalised. The advantage of a common name for all of these different stages is that it makes it easy to reorder your modules - to execute a model on the unnormalised rather than normalised data, for example, just by putting aamod_firstlevel_module before aamod_norm_write.
There are many other streams - check the <inputstreams></inputstreams> and <outputstreams></outputstreams> sections of the .xml files of the modules.