New in aa version 2.0

Parallel processing

See the new page AutomaticAnalysisParallel

Changed way task parameters are stored internally

Only relevant if you specify your own tasklist in the user script. Previously, when creating a new tasklist, you needed to put:

% [OLD FORM, FOR aa_ver1.2]
aap.tasklist.epiprefix=[];      % reset prefix list
aap.tasklist.stages=[];         % reset list of stages

% Then specify individual tasks...
aap=aas_addtask(aap,'aamod_mytask'); % and so on

Now, aap.tasklist.stages is an array of structures, rather than an array of names, so you just need

% [NEW FORM, FOR aa_ver2 onwards]
aap.tasklist.stages=[];         % reset list of stages

% Then specify individual tasks...
aap=aas_addtask(aap,'aamod_mytask'); % and so on

I have done this because there were an increasing number of options associated with a stage (stages, epiprefix, tobecompleted, extraparameters) and having lots of separate lists is clumsy and inelegant

An error will be generated if you leave the old epiprefix line in.

Author: Rhodri Cusack

Improvements to first level statistical modelling module (aamod_firstlevel_model)

Automatic insertion of correct time bin

Uses reference slice (from aap.spmanalysis.refslice) and slice order (from aap.spmanalysis.sliceorder) to calculate correct value for time bin (SPM.xBF.T0) parameter, assuming that your stimulus timings are measured relative to the start of each volumes (e.g., onset value "0" in model corresponds to start of first volume).

Author: Rhodri Cusack with Rik Henson

Option to switch off masking

By default, data are truncated around the edge of the brain, where the EPI intensity is less than a fixed proportion of the mean. This can occasionally mask interesting effects near the surface of cortex. This is controlled by SPM.xM.TH and SPM.xM.I. Default is

aap.spmanalysis.firstlevelmasking=1;

but add to your user script...

aap.spmanalysis.firstlevelmasking=0;

...to switch masking off Author: Rhodri Cusack with Daniel Mitchell

Option to control whether movement parameters are added to your model

Default is

aap.spmanalysis.firstlevelmovementparameters=1;

Add to your user script...

aap.spmanalysis.firstlevelmovementparameters=0;

to not add movement parameters

Author: Rhodri Cusack

Optional extra parameter to specify output directory for model

I always find I need to run several models on each study. Previously, it was necessary to write a different user script for each one, as the singlesubj_stats and rfx_stats directories specifying the output names for the model directories could only have one value per aap structure (they were stored in aap.directory_conventions).

I have made a new system to more elegantly manage this. Here is how it works: (1) Choose a recipe >without< a model (e.g., aarecipe_general_v02) (2) Copy aamod_firstlevel_model and aamod_firstlevel_contrasts from the aa modules directory (find by typing which aamod_firstlevel_model at matlab prompt) to the same directory as your user script and modify them to reflect your particular experiment. Also, you might want to change their names to describe the particular model (3) Assuming you changed their names to aamod_firstlevel_model_1_basic and aamod_firstlevel_contrasts_1_basic, use this chunk of code before the aa_doprocessing command in your user script:

analysisname='1_basic';
clear myextraparams
myextraparams.stats_suffix=analysisname;
aap=aas_addtask(aap,['aamod_firstlevel_model_' analysisname],'swar',[],myextraparams);
aap=aas_addtask(aap,['aamod_firstlevel_contrasts_' analysisname],[],[],myextraparams);
aap=aas_addtask(aap,'aamod_secondlevel_model',[],[],myextraparams);

The optional fifth option in aas_addtask, here passed "myextraparams", provides extra details to the module. These may change if a module is called repeatedly with different input, for example. The three modules used here all accept a "stats_suffix" field, which will be added to the end of the directory name for the first or second level model.

Option to average across structurals when there is more than one

Put this in your user script

aap.options.autoidentifystructural_average=1;

Structurals will be coregistered to the first structural and then averaged.

Author: Rhodri Cusack with Elisabeth von dem Hagen

New recipe and example user scripts for dual echo

The new recipe aarecipe_dualecho_noslicetiming_ver01 (see AutomaticAnalysisRecipes) has been written for the dual echo sequence.

Morgan also kindly provided aa_user_dualecho_GE and aa_user_dualecho_SE, which are in the examples directory

Authors: Karen Taylor and Morgan Barense

Raw data prefix moved out of individual tasklists

Instead of the prefix for the raw data ('f' before) being incorporated into the prefix list part of the tasklist parameter set, it is now stored (together with 'CBU') in the directory_conventions parameter set

aap.directory_conventions.rawdataafterconversionprefix='fCBU';

This has two advantages (1) It is easy to change the 'f' into an 's' for use with the dual echo data - put in your user script:

aap.directory_conventions.rawdataafterconversionprefix='sCBU';

(2) The 'CBU' part can be modified easily by those from other sites.

Author: Rhodri Cusack

Added facility for specifying series by position in file listing rather than filtering by name

Data from our scanner typically is named something like "Series_001_..." and so on. The number has been used to filter the data.

The dual echo sequence puts the acquisition date & time instead of "001".

You may now specify

aap.directory_conventions.rawseries_usefileorder=1;

to ask for raw series to be referred to by their order in file listing instead of name. This applies both for the ouput of aamod_autoidentifyseries* and for your EPI series specifications for each session.

Author: Rhodri Cusack

Small changes to recipes

All of the tasklists of the common recipes have been modified to provide dependency information in the "to be completed first" field. In addition, for the recipes that include slice timing after realignment, I have made coregistration work on the output of realignment rather than waiting for slice timing to finish. This relies upon slice timing have little effect on the mean, which as it is a form of temporal resampling, will be almost exact.

Pick particular echoes

You may make the epi conversion routines and any subsequent stages of processing that use aas_getimages (all supplied modules) be specific to particular echoes. For our typical dual echo sequence, echo 1 is a gradient echo and echo 2 a spin echo.

Put

aap.directory_conventions.selectechonumbers=1;

and then

aap.acq_details.sessions_echonumbers=[1 2 1]; % for three sessions

where this example is for a study with 3 "sessions". The first will be a gradient echo, the second a spin echo, and the third a gradient echo. The first two would possibly refer to the same acquisition run, but pick out different echoes.

Note, you should be aware that it is theoretically possible that some stages of processing (motion correction?) will not take kindly to being supplied mixed images. If you are concerned about this, you should conduct completely separate GE & SE AA analyses (e.g., separate user scripts and output directories), one with all sessions_echonumbers as 1, the other all 2.

Author: Rhodri Cusack

DICOM conversion now operates in chunks of 128 dicom files

This stops it creashing with the obscene number of files generated by non-mosaic format EPI (10000+ files per time series)

Author: Rhodri Cusack