#!/bin/tcsh

### Script for Part 6 of AFNI Time Series Analysis videos
### - Create a regression matrix for an experiment with
###   20 second BLOCKs every 30 seconds
### - But using the IM approach rather than putting
###   all the BLOCKs into one regressor
### - Plot results into s6b.png and s6b.xmat.png

# Create the matrix (s6b.xmat.1D)
# It will have 10 columns - one for each stimulus time

3dDeconvolve -nodata 150 2.0      \
             -polort -1           \
             -x1D s6b.xmat.1D     \
             -x1D_stop            \
             -xjpeg s6b.xmat.png  \
             -num_stimts 1        \
             -stim_times_IM 1     \
              '1D: 0 30 60 90 120 150 180 210 240 270' \
              'BLOCK(20,1)'

# plot the graphs of the columns in the matrix

1dplot -xaxis 0:150:15:2 -xlabel TR -png s6b.png s6b.xmat.1D
