setting up a computer for an AFNI class

basic instructions



    Setting up a class computer amounts to creating an account, installing
    AFNI data and binaries, installing any missing libraries, and verifying
    that the video drivers are working properly (for suma).

    If binaries are already installed, it should be sufficient to execute
    the bold-face commands from steps 3 and 4.


    0. A class computer will presumably be running a current version of
       OS X, Linux or *BSD for its operating system.

       Aside from the OS, each computer should have at least 6 GB of free
       disk space for data and AFNI binaries.  The "Start to Finish" class
       data alone requires 2 GB (for complete, single subject processing).

       Computers should have at least 2 GB of RAM.

    1. Create a user account, preferably called 'afniuser'.  The user's
       shell should be /bin/tcsh (bash is okay IF the user is very
       comfortable with it).

        (consider the command: chsh -s /bin/tcsh)

    2. Install current AFNI binaries, preferably under the 'afniuser' home
       directory, in ~afniuser/abin .  That is not essential, but it is common
       and is used in examples.

       Binaries are available from /pub/dist/tgz.

       Go back to HowTo #0 for details on installing the AFNI binaries.


    3. Install current data.

       All of the data is contained in one tgz file.  That could be extracted
       either on the destination machine, or perhaps on a USB drive or DVD.
       The 'CD' is to big for an actual CD now...

       The CD directory contains the s2.cp.files script to install data.
       It takes a source directory (the CD dir) and a destination directory
       (probably ~afniuser) as options.

       Install the data as 'afniuser', so that ownership is not an issue.

            curl -O
            tar xfz CD.tgz

            cd CD
            tcsh s2.cp.files . ~

       CD.tgz is no longer needed.  The CD directory is presumably still needed
       for other machines.

         a. This script also installs .cshrc, .afnirc and .sumrac into the
            destination directory, moving the old files to bak.NAME
            (for each NAME).
         b. The included .cshrc file adds $HOME/abin to the path.  If that is
            not where the binaries are installed, it will need adjusting.
         c. If some/all of the dotfiles are not wanted, just remove them from
            the 'dotfiles' directory.

    3b. Set up string searching and tab completion.
            apsearch -update_all_afni_help

    3c. (optional) Install InstaCorr demo data by running install script.
        This step is optional since the data will not be covered in the
        current bootcamp.


    4. Test the main installation.

       Once the data and binaries are installed, it should be verified
       that the 'afni' and 'suma' programs can run correctly, and that
       running suma from a demo directory opens a surface dataset that
       can be manipulated smoothly.

       Starting afni and suma can be done by running the s3.test script.
       Or execute the following commands:

            cd ~/suma_demo/afni
            afni -niml &
            tcsh run_suma &

       After afni and suma have both started, perform some additional tests:

        a. Once 'suma' has loaded the surfaces, verify that rotating the shown
           surface is smooth.
        b. From the 'suma' image window, press 't' to talk with 'afni'.
        c. Open an Image window in 'afni' and verify the surface outlines
           (shown in blue and/or green along the edges of the gray matter).
        d. To test the rendering speed for OpenGL, press the F12 key in the
           'suma' window, which times how long it takes for 20 renderings. The
           results are echoed to the shell: 10 displays/second is good, 50+ is
           now typical, 5 is something we can live with.

    5. Test, to verify whether needed python libraries are

       Run to see whether it starts without errors.


       For a complete test, consider running to test all
       of the python modules used in AFNI programs.  Also, run 3dMEMA to check
       whether the R libraries are installed.

       Note that these tests are not essential for the class.



Some miscellaneous points:

    A. It is vastly preferable to have windows selected when the mouse
        moves over them (as opposed to click-to-select).
       Consider these commands for the X11 and Terminal applications:
          defaults write org.x.X11 wm_ffm -bool true
          defaults write FocusFollowsMouse -string YES
    B. It is vastly preferable to have 3-button mice, and with all of
        the buttons appropriately activated (see mouse control on macs).
    C. Note which program can be used to open the afni_handouts (pdf).
        E.g.  acroread, xpdf, gpdf, ggv, or just 'open'
    D. It is useful to verify how the users can cut-and-paste.  E.g.
        i)  [Unix] left mouse button to select, middle to paste
        ii) [mac]  apple-c (to copy), apple-v (to paste)
    E. It may be nice to note a text-editor that can be used (on files
        that do not necessarily end in .txt).
        E.g. gedit, nedit, xemacs, xedit, TextEdit (wants .txt?)