-------------------------------------------
 The SessionsTools->Make Scandirs,Find/Copy Raw
 menu names and creates scan directories,
 documents source of the files, strips initial
 TRs, and copies stripped scans into the new scan
 directories with meaningful, unique names.
-------------------------------------------

Getting Started

This panel is designed to be the first panel
accessed after running File -> New Functional.
It requires a virgin session directory tree
containing no scan directories.   If scan
directories have already been created (even if
they are empty), you won't even be able to open
this panel.   First manually remove existing scan
directories (the panel ignores the "rgb",
"scripts", and "tmp" directories in a newly-made
session).

Click the Find Raw Scans button at the top of the
panel to begin.  Click SETUP NEW SCANDIR one or
more times to create blank scan configuration
lines.  DELETE LAST SETUP deletes the most
recently added line, whether or not you have
altered it.

Create Scan Directories and Find Raw Scans

The scan directory name is the main text label
used in the rest of the interface for each scan,
and so it helps to choose informative names and
use them consistently.  One good name for a scan
is the name of the stimulus program that was
used.

By default, the first scan directory is the
alignment scan directory, and it is auto-named
"alignscan".  Directories after that are given
default prefixes: "1-", "2-", etc.  You can
change the names of the proposed scan directories
to whatever you like, but the names must be
unique (the default number prefixes guarantee
this, even if the stimulus exactly repeats --
e.g., "1-polar", "2-polar", etc).

For each new scan directory, click the FIND
button to locate a single raw alignment or
functional scan.  Subsequent FIND button clicks
start the directory browser in the parent
directory of the most recently selected Raw
Scan.

Once you are satisfied with the mapping between
scan directory names and raw scan names, click
MAKE SCANDIRS at the top of the panel.  If all
the fields are complete, the name list is unique,
and the raw scans all exist, the new scan
directories should appear on the left of this
panel (if not, fix things and click MAKE SCANDIRS
again).  Small text files containing the source
of the data will be created in each of the scan
directories.  If you want to redo this stage,
remove the just-created scan directories (which
will contain only small text files).

Strip Initial TRs and Copy/Rename Raw Scans

When the MAKE SCANDIRS button is clicked
successfully, default unique scan names will be
inserted into the right-most column (New Scan
Names).  These names must be unique because they
are used as the prefix for saved bitmaps, which
all reside in the same rgb directory.  These
names can be adjusted if necessary.  You may also
want to reset the number of repetitions ("rmTRs")
to strip off the begining of the functional
scans.  The defaults are to strip 0 for the first
(alignment) scan and strip 4 initial repetitions
off of subsequent functional scans.

Finally, click STRIP/COPY-RAW at the upper
right.  After checking the list of new names for
completeness and uniqueness, this strips TRs and
copies the raw functional scans into each scan
directory.

The STRIP/COPY-RAW function currently only works
with AFNI BRIKS. For now, if the fastest changing
index in the scan is not in the right/left
direction, the internal data order of the BRIK
will be flipped into this order and the HEAD is
updated to reflect this change (because some
later analysis steps do not yet read the AFNI
HEAD file).

