- How to use Blocked fMRI Session Profile Before you start to analyze Blocked fMRI scan data, you need to input data and parameters. You also would like to save the inputted information into a file for later retrieval. This SESSION PROFILE window provides you with an efficient way to input and save the data and parameters, as well as to create a corresponding datamat. One Blocked fMRI Session represents one subject, which includes a group of runs in a set of conditions. Each condition will have different blocks of onset images for different runs. The length of block can be varied. - Session Description It is nice to have a Sesson Description to describe what this experiment will include. - Working Directory To use this window, you MUST provide a PLS Data Directory name (or you can also call it 'Working Directory'). In this directory, you will save the session file, datamat, and result file. Like the way you prepare the data for command_line PLS analysis for Blocked fMRI scan, you already have several runs of the subject data. They should be organized in a way such as each run has its own directory, and inside the directory, there will be scan files for that run. It will be convenient for you if you put runs' directories immediately under your working directory. - Datamat Prefix It is more convenient to tell the data from its file name, before open it. We use '_fMRIsession.mat' to represent Blocked fMRI session profile; use '_fMRIdatamat.mat' to represent Blocked fMRI datamat; use '_fMRIresult.mat' to represent Blocked fMRI result data. So, enter a meaningful datamat prefix here will make yourself easy later. - Edit Conditions Click 'Input Conditions' to enter the condition names under which you get those experiment data. The 'Reference Scan Onset' and 'Number of Reference Scans' are options you can use if you would like to use multiple scans (we call it reference scans) to express the stimulus effect, instead of just 1 scan. By default, stimulus effects for a block are calculated with respect to the first scan of the time series. Changing the values in these fields allows you to use a different set of images to define the pre-stimulus interval. The 'Reference Scan Onset' is the first image scan for the reference scans. After you click 'DONE', the number of conditions you entered will be displayed in 'Number of Conditions:' field. - Edit Run In order to click 'Edit Run', you must first enter the number of runs to be used for the PLS analysis. Once you click the 'Edit Run', the Run Information window will open. First, you need to provide Number of Scans that will be used for PLS analysis. Then, click 'Browse' to select the same amount of scan files from the run directory. In the Block Onsets frame, you provide the the scan numbers at the onset of all stimulus event (like 12 24 36) for each condition. Onsets are specified in terms of scan number, which starting from 0. If a onset is located between two scans, decimal number can be used for the onset. However, it will be converted to the closest smaller integer number. You also need to provide the length of block for each stimulus. If you just enter one value in the Length field, it will automatically apply this value to all the stimulus in this condition. Click '>>' button to the next run, and repeat the above steps for all the runs until the '>>' button is disabled. Then, click 'DONE'. You can leave some some task condition empty for some runs; however, you can not leave one condition empty across all the runs. TIPS - Input Onset: Onsets can be inputted by calling a MATLAB statement. If the first character of the onset edit line is '@', the rest of the line will be interpreted as a MATLAB command which return a vector for the onsets. Before the line being executed as MATLAB statement, any words of '{run#}' and '{cond#}' in the statement will be replaced by the current run number and condition number, respectively. To repeat the last MATLAB statement, put '@@' in the onset edit line. - Create Datamat In Block fMRI, one session file will have one (and only one) datamat file, each session file (or datamat file) is corresponding to one subject. It will need both session and datamat file to run analysis and display result. Before creating datamat, you muse have the session profile saved first. Click the 'Create Datamat ...' will lead you to Create Datamat window. In the Brain Region frame, you can either use a predefined brain region image, or enter a value in the threshold field to define the brain region. Any voxels with values below 1/threshold of the max. value in the volumes will be removed. If 'Number of scans to be skipped' field is not zero, it stands for the number of image files that were not included in the selected Data Files list in the 'Browse Data File' in 'Run Information' window, while the onset is numbered from the whole file list. If there is no image files excluded, or if you number the onset based on the selected file list (from 'Browse Data File' in the 'Run Information' window), you can always keep the 'Number of scans to be skipped' field 0, which is the default value of the program. The default value for 'Run to be included' list is [1:max_run]. You can modify this list to exclude some runs. The default value for 'Slices to be ignored' list is empty, and you can modify this list to exclude some slices in Z direction. If you normalize data with the volume mean (default), for each row (or each scan, or each volume), the data will be divided by the mean of this row. If you normalize data with the baseline (default), for each row (or each scan, or each volume), the data will be divided by the mean of the baseline scans. If you merge data of each condition within each run only, same condition in different runs will be on a separate row; otherwise, all same condition will be averaged in the same row. If you prepare to run Behavior PLS, you MUST also provide the behavior data, which is not required for running Task PLS. The number of rows of your behavior data must match the Behavior PLS test you are running. For example, if there are 3 conditions, and you chose 'across all runs', the number of rows in behavior data will be 3. If you chose 'within each run' and you have 5 runs, then, the number of rows in behavior data will be 3*5 = 15 The behavior data is prepared in ASCII format. Once you click 'Edit Behavior Data' button, the 'Edit Behavior Data' window will open. You can click the 'Browse' button to get the behavior data text file you prepared, or you can also directly enter the number into the text input area. Depending on how many column in the 'Behavior Data', the 'Behavior Name' will automatically be filled as 'behav1 behav2 ...'. You can change the behavior name by edit them. You can use any alphanumeric or '_' charactor for behavior name. Don't use special charactors, also don't use space, which acts like a delimiter. If you chose 'across all runs', the row order of behavior data is the same as condition order. If you chose 'within each run', the row order of behavior data is in the form of [cond1/run1; cond1/run2; ... ; cond2/run1; cond2/run2; ...;]. i.e. in the order of each run, then in the order of each condition. After you click 'OK' button, the data you entered will be saved into the session file, corresponding to either 'across all run' or 'within each run'. So, each session file can save 2 sets of behavior data.