Important Note

For users who already have SMART installed and are upgrading to a new version: when first used SMART makes an extra directory called "smart_bin". This resides usually within the SMART directory (see instructions below). When installing a SMART upgrade this "smart_bin" directory must be deleted before the new version of SMART is installed. Failure to delete it can result in significant version incompatibility problems.



Requirements

  • Operating system: SMART is compatible with all recent Linux systems and with Darwin systems (Mac OS, latest tests up to 10.6) as well.
  • IDL needs to be installed on the system. SMART has been successfully tested until IDL 7.0. If you have any problem running SMART with IDL 8.0 please let us know by reporting an issue in the bugtracker.
    IDL Version 6.2: Add an additional "Personal Environment" variable the "smart" shell script in the "smart" directory.
    Make this the first "Personal Environment" variable , listed between the two sets of four hashes "####" (see Startup Files?).
     #Set IDL Path Cache Disable
     setenv IDL_PATH_CACHE_DISABLE 1 
     
  • Astrolib IDL library. SMART includes certain publicly available IDL routines taken from Astrolib, The IDL Astronomy User's Library maintained at the NASA Goddard Space Flight Center. Please ensure that Astrolib is installed on your system before attempting to use SMART. SMART has been successfully tested with the most recent version of Astrolib.

Step 1: Download and install the package

The SMART download consists of a single tarball:

  • smart-package-[version number].tar.gz This is a gzipped tar-file that contains the IDL source code for SMART and the SMART Calibration files. If you want to download the SMART software and the calibration files separately, check the Download page.

To install SMART, unpack the tar file by running this command at the prompt:

gzip -dc smart-package-[version number].tar.gz | tar xvf - 

Step 2: Set up the IDL PATH

Recommended use of the IDL PATH: For users unfamiliar with IDL path set up, we suggest that all modifications to the IDL path are made in the IDL startup file rather than in the startup shell script (via the shell variable IDL_PATH). Modifying the IDL path in the startup shell script could result in compiling wrong procedures when launching Smart.

  • create a startup IDL file in the home directory, and call it for instance
    startup.idl
  • create an environment variable in the startup shell script:
    • in CSH:
      setenv IDL_STARTUP /home/me/startup.idl
    • in BASH:
      export IDL_STARTUP=/home/me/startup.idl
  • in the IDL startup file, put the location of Smart and Astrolib in this order and before every other directory in the path, for instance:
    • !PATH = EXPAND_PATH('+/home/me/Astrolib/pro/') + ':' + !PATH
      !PATH = EXPAND_PATH('+/home/me/Smart/') + ':' + !PATH
      !PATH = !PATH + ':' + EXPAND_PATH('+/home/me/AnyUnrelatedDirectories/')

Step 3: SMART launch script.

Method 1: Launch SMART via a shell script (traditional method)

This is the traditional way of running SMART. It uses a shell startup script called "smart" to execute. Edit the smart startup shell script located in the SMART root directory. The script itself is written in "bash". (NOTE: It will run regardless of the running shell). The following is the section of the code which should be changed is:

# CHANGE HERE THE ROOT OF SMART ex: $HOME/smart/
export SM_HOME=$HOME/smart/

# CHANGE HERE THE IDL DIRECTORY (containing bin/, lib/, etc...)
export IDL_DIR=/usr/local/rsi/idl/

  • SM_HOME: If SMART is installed in the home directory (default), there is no need to change SM_HOME. Otherwise, make sure this variable is set to the directory name where SMART is located.
  • IDL_DIR: location of the IDL directory (containing bin, lib, help subdirectories). To find the location of IDL, you can type at the shell prompt
ls -l `where idl`
Note that the required IDL directory has to be the actual directory, not a link, hence the use of this shell command. The output of "where idl" alone will probably be just a link to the actual directory.

######################################################################
######################################################################
# THE FOLLOWING USUALLY DOES NOT HAVE TO BE CHANGED
######################################################################
######################################################################

# root of smart calibration data files, ex: $SM_HOME/IRS_Calibration/
export SM_CAL_DATA=$SM_HOME/IRS_Calibration/

# path of smart user defaults directory, ex: $SM_HOME/smart_bin/
export SM_BIN=$SM_HOME/smart_bin/

# set default WWW Browser
export SM_WWW_BROWSER=firefox

  • SM_CAL_DATA*: By default the calibration files reside within the SMART directory. If the user wants to change this, the variable needs to be modified.
  • SM_BIN: The SM_BIN variable sets the location of the "preferences" directory used by SMART. This lies by default within the SMART directory. If the user wants to change this, the variable needs to be modified.
  • SM_WWW_BROWSER*: SMART uses a web browser for one or 2 links in the GUI.

Method 2: Launch SMART in an already started IDL session

It is possible to launch SMART within IDL provided the PATHs are set correctly (see Step 2). If the user chooses this option, another file has to be changed: the IDL startup script, called smartconfig.pro (it used to be smart.config), residing in the SMART root directory. The only line that should be changed is this one:

; root of smart, ex: $HOME/smart/
setenv, 'SM_HOME=$HOME/smart/

;####################################################################
; THE FOLLOWING USUALLY DOES NOT HAVE TO BE CHANGED
;####################################################################

; root of smart calibration data files, ex: $HOME/smart/IRS_Calibration/
setenv, 'SM_CAL_DATA=$HOME/SmartRelease/temp/smart/IRS_Calibration/'

; path of smart user defaults directory, ex: $HOME/smart/smart_bin/'
setenv, 'SM_BIN=$HOME/SmartRelease/temp/smart/smart_bin/'

; set default WWW Browser
setenv, 'SM_WWW_BROWSER=firefox'
See instructions from the shell script above.

Step 4: How to run SMART

Run SMART via the shell or via IDL

Method 1: Launch SMART via a shell script (traditional method)

For ease of use a "smart" command can be aliased, depending on the type of Unix/Linux shell in use :

Shell Alias File Name Alias Command
     
Bourne Again Shell ".bashrc" "alias smart=/home/username/smart/smart"
C Shell ".cshrc" "alias smart '/home/username/smart/smart'"
T Shell ".tcshrc" "alias smart '/home/username/smart/smart'"

Method 2: Launch SMART in an already started IDL session

Launch IDL and type smart.

First launch

Launching SMART will display the Project Manager which is the starting point for all interactive use of SMART.

You can launch SMART without the GUI by typing
smart com

In this mode SMART scripts can be run and SMART routines can be used for indivdual operations. NOTE : This mode should be used for SMART scripts and routines as it sets required environment and parameters.

At any time during this IDL session to launch the SMART Project Manager type at the IDL prompt

IDL> smart_project

On first use SMART automatically creates a directory in your home directory : /home/username/smart_bin/
In the "smart_bin" directory five files will be created :

  1. "sm_cal_sys.idl" which will store SMART default Calibration preferences. (See Calibration Selection.)
  2. "sm_cal_usr.idl" which will store your Calibration preferences. (See Calibration Selection.)
  3. "sm_parm_sys.idl" which will store SMART default parameter preferences. (See User Parameters.)
  4. "sm_parm_usr.idl" which will store your parameter preferences. (See User Parameters.)
  5. "irs_ws_s??_?.xdr" which is an IDL Save File containing the wavesamp information for a given calibration file release. This is automatically generated on first invocation of SMART (or a new version) and when wavesamp Calibration file preferences are changed.

  1. To have the SMART environment running within IDLWAVE when using EMACS do the following :
    1. Open any ".pro" source code file with EMACS.
    2. From the menu bar select, "IDLWAVE", "Customize", "Browse IDLWAVE Group".
    3. The custom menu will appear, select "Idlwave External Programs".
    4. Select the option "Idlwave Shell Explicit File Name".
    5. In the box marked "Idlwave Shell Explicit File Name" type "/home/username/smart/smart". (IE. Use the absolute path name for the SMART installation.)
      (NOTE: CVS users who have moved the "smart" script to their "bin" directory (or elsewhere) make sure the path is set to "bin", etc.)
    6. Click on "Save for Future Sessions" and then "Finish".
    7. Select the option "Idlwave Shell Command Line Options".
    8. In the box marked "Idlwave Shell Command Line Options" type "com".
    9. Click on "Save for Future Sessions" and then "Finish".
    10. Exit EMACS, then re-open any ".pro" source code file with EMACS.
    11. Invoke the IDL shell as normal. The SMART setup will run and its messages will be visible in the shell before the "IDL>" prompt appears.
  2. To use the SMART team standard header for SMART source code members :

    1. Obtain the "header_template.txt" from the SMART team.
    2. Place the "header_template.txt" file in the relevant directory. IE. "/home/username/smart" etc.
    3. Add the following lines to the relevant ".emacs" file :
    4.      (add-hook 'idlwave-mode-hook
                     (function
                      (lambda ()
                        (setq
                         idlwave-file-header '("/home/username/header_template.txt")
                        ))))
      
    5. To insert the template in a piece of IDL source code (".pro" type) first open it with the EMACS text editor.
    6. On the top menu bar select "IDLWAVE", "Templates", "Doc Header" and the template will be automatically inserted at the top of the source member.

Checking updates

Once SMART is installed the version number can be checked by viewing the read only file

smart/smart_version.txt
or by clicking on Help->About in the main window. Be sure to mention the version number when submitting a bug to the SMART team.

Updates can be checked by clicking on Help->Check Updates

New versions and major modifications are announced via the smart-release mailing-list.

Most frequent causes for failed installations or failed first launch

  1. Astrolib is not installed, or the path to Astrolib is not well set in the IDL path.
  2. The SMART path, IRS_Calibration, and Astrolib path are not first in the IDL path, and are not in this order

 
This site is powered by FoswikiCopyright © 2002-2018 by the IRS Team.
Send feedback. We use Foswiki.