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 in the same directory as SMART or in the home 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.
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 the tar packages
The SMART download consists of two tarballs:
-
smart-x.tar.gz (where x is the version number). This is a gzipped tar-file that contains the IDL source code for SMART.
-
IRS_Calibration-y.tar.gz (where y is the version number). This is a gzipped tar-file that contains the most recent set of SMART Calibration files.
Download the tar packages to any directory.
Step 2: Install the tar packages
To install the main SMART program, unpack the tar file by running this command at the prompt:
gzip -dc smart-[version number].tar.gz | tar xvf -
To install SMART Calibration Files, unpack the tar file by running this command at the prompt:
gzip -dc IRS_Calibration-[version number].tar.gz | tar xvf -
Step 3: Set up the PATH
Recommended use of the IDL PATH:
- create a startup IDL file in the home directory, and call it for instance
startup.idl
or .idl_startup
- create an environment variable in the startup shell script:
- in the IDL startup file, put the location of Smart, IRS_Calibration, and Astrolib in this order and before every other directory in the path, for instance:
-
!PATH=':/home/me/Smart/'+':/home/me/IRS_Calibration/'+':/home/me/Astrolib/pro:'+!PATH
device,true_color=24
device,decomposed=0
device,retain=2
- note the last 3 lines to avoid color problems with many IDL applications...
Step 4: SMART startup script
SMART uses a shell startup script called "smart" to execute. The script itself is written in "bash". (NOTE: It will run regardless of the running shell).
This script sets several path locations that are dependent to the particular system.
The following is the section of the code
which needs to be changed
(denoted between the two sets of four hashes "####" in the "smart" file) :
#
####
#
# root directory of smart
export SM_HOME=/home/username/smart/
#
# root directory of calibration data files
export SM_CAL_DATA=/home/username/smart/IRS_Calibration
#
# path of smart user defaults directory
export SM_BIN=$HOME/smart_bin
#
# root directory of idl (containing the subdirectories lib, help, bin, ...)
# type ' ls -l `where idl` to have the location
export IDL_DIR=/usr/local/rsi/idl
#
####
#
- SM_HOME, SM_CAL: If SMART is installed in the home directory ("/home/username") as described in Download and Installation there is no need to change SM_HOME or SM_CAL_DATA. Otherwise, make sure these two variables are set to the directory names where the SMART and Calibration files (respectively) are located.
- SM_BIN: The SM_BIN variable sets the location of the "preferences" directory used by SMART. This needs to be within the user's home directory ("/home/username") since it is modified every time SMART is run. In general, leave it set to the default value.
- 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
where idl
An output example is /usr/bin/idl. This is not necessarily the actual directory where IDL lies, as it is most often a simple link. To reveal the actual location of IDL, then type
ls -l /usr/bin/idl
# Set default WWW Browser
# If you use another WWW Browser please add a command for it
#
#export SM_WWW_BROWSER="iceweasel"
#export SM_WWW_BROWSER="gnome-www-browser" # Gnome environment
#export SM_WWW_BROWSER="x-www-browser" # KDE environment
export SM_WWW_BROWSER="firefox"
#export SM_WWW_BROWSER="galeon"
#export SM_WWW_BROWSER="mozilla"
#export SM_WWW_BROWSER="epiphany"
#export SM_WWW_BROWSER="netscape"
- SM_WWW_BROWSER: SMART uses a web browser for some tasks.
The SMART default WWW browser is Firefox.
Edit the "setenv SM_WWW_BROWSER" variable to a WWW Browser you have installed on your system.
The relevant code in "smart" is :
To change default WWW Browser insert a "#" in front of "setenv SM_WWW_BROWSER "firefox""
and remove the "#" before the line containing the name of the default WWW Browser you prefer to use.
You may add one or more extra lines to accomodate other WWW browsers not listed already.
No more than one default WWW Browser may be set at any one time.
If you set more than one only the last one set will be used.
Step 5: How to run SMART
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'" |
Step 6: First launch
Launch SMART at the shell prompt by typing
smart
This will display the SMART
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 :
- "sm_cal_sys.idl" which will store SMART default Calibration preferences. (See Calibration Selection.)
- "sm_cal_usr.idl" which will store your Calibration preferences. (See Calibration Selection.)
- "sm_parm_sys.idl" which will store SMART default parameter preferences. (See User Parameters.)
- "sm_parm_usr.idl" which will store your parameter preferences. (See User Parameters.)
- "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.
- To have the SMART environment running within IDLWAVE
when using EMACS do the following :
- Open any ".pro" source code file with EMACS.
- From the menu bar select, "IDLWAVE", "Customize", "Browse IDLWAVE Group".
- The custom menu will appear, select "Idlwave External Programs".
- Select the option "Idlwave Shell Explicit File Name".
- 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.)
- Click on "Save for Future Sessions" and then "Finish".
- Select the option "Idlwave Shell Command Line Options".
- In the box marked "Idlwave Shell Command Line Options" type "com".
- Click on "Save for Future Sessions" and then "Finish".
- Exit EMACS, then re-open any ".pro" source code file with EMACS.
- 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.
- To use the SMART team standard header for SMART source code members :
- Obtain the "header_template.txt" from the SMART team.
- Place the "header_template.txt" file in the relevant directory.
IE. "/home/username/smart" etc.
- Add the following lines to the relevant ".emacs" file :
(add-hook 'idlwave-mode-hook
(function
(lambda ()
(setq
idlwave-file-header '("/home/username/header_template.txt")
))))
- To insert the template in a piece of IDL source code (".pro" type)
first open it with the EMACS text editor.
- 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
Most frequent causes for failed installations or failed first launch
- Astrolib is not installed, or the path to Astrolib is not well set in the IDL path.
- The SMART path, IRS_Calibration, and Astrolib path are not first in the IDL path, and are not in this order