SolarSoft

Running SolarSoft under Windows

R.D.Bentley, M.Berg, A.K.Tolbert, S.L.Freeland; June 2000
Last Updated: R.D.Bentley; 14 November 2000

This page assumes that you have already created a SolarSoft installation on your Windows PC using the Installation Guide on the SolarSoft web pages. A certain familiarity with SolarSoft is also assumed - see the SolarSoft Web pages if you need any information. This page also refers to the SolarSoft Data Base (SSWDB) files - details of how to install SSWDB under Windows are given below.

Contents

The SolarSoft Environment
Invoking SolarSoft
    Configuring IDL
    Running SolarSoft
    Customizing the setup
The SolarSoft DataBase (SSWDB)
Comparison between Windows and Unix SolarSoft Setup

The SolarSoft Environment

The SolarSoft environment is created using setup files that define environment variables, and startup files that execute procedures as IDL starts. The setup files can be found in the SSW tree in \setup directories under the gen, instrument and site directories - they have filenames of the form setup.xxx_path and setup.xxx_env. The gen and instrument level setup files define default values of variables; the site level files modify the defaults to allow for local differences in the location of files.

See the SolarSoft Setup web pages for more information on the setup and startup files. Since the setup files are used under all operating systems (including Unix and Windows), a particular format had to be adopted and the syntax used in the files is that defined by Unix.

In the explanation given below, it is assumed that your SolarSoft installation was made under c:\ssw. The actual location on your site may be different to this, and should be specified when you make your installation with the Web page. If it is different, substitute the actual location for c:\ssw in any instructions below.

To run IDL in the SolarSoft environment, the user must start their session by executing the procedure idl_startup_windows which is provided in \gen\idl\ssw_system - this is normally done by invoking a .bat file which defines the procedure as the startup routine for IDL. The idl_startup_windows procedure (which is not to be edited by the user) defines the SSW and SSWDB environment variables and runs the general setup files to include the SSW tree in the IDL path and defines general environment variables. Detailed instructions are given below.

Invoking SolarSoft

Configuring IDL

Before you can use SolarSoft, you first need to configure your IDL preferences:

1.    Start IDL.
2.    Click File, then Preferences, then the Startup tab.
3.    Set Startup File to blank.
4.    Set Working Directory to blank. (optional)
5.    Exit IDL.

Running SolarSoft

To start SolarSoft, double-click the c:\ssw\site\setup\sswidl.bat file.

You now have an IDL session with all of the general components of SSW set up for you. You may add specific instrument functionality to your session (for example TRACE and Yohkoh/SXT) using setssw_windows. At the IDL command line, the syntax is:

    setssw_windows, /trace, /sxt
The names used for the switches should be the same as the names of the instrument-level branches in the SSW tree.

When you start SolarSoft, default setup files are executed, together with any site and personal idl_startup files. When instruments are added, mission and instrument level setup files (setup.xxx_paths and setup.xxx_env) and idl_startup files are executed; any site and personal idl_startup files are repeated. Any instrument included in your SolarSoft installation may be added at any time during the session. You can verify the path within your IDL session (the value of !path) using pr_path - this indicates the branches of SSW present in your current SolarSoft environment.

Customizing the setup

One advantage of starting SolarSoft using the sswidl.bat file is that it can be customized to select your working directory, to run a personal IDL startup file, and to select a default set of SSW instruments. In addition, you may create several different versions of the sswidl.bat file to easily start IDL with different default environments.

The default sswidl.bat file will be similar to the following:

   rem   Define the location of SolarSoft, SSWDB and the Windows idl_startup
   set SSW=c:\ssw
   set SSWDB=c:\sswdb
   set IDL_STARTUP=c:\ssw\gen\idl\ssw_system\idl_startup_windows.pro

   rem   A personal startup can be defined by editing the following statement
   rem set SSW_PERSONAL_STARTUP=c:\user_dir\idl_startup.pro

   rem   You can define the default working directory using a cd command
   rem cd c:\working_dir

   rem   A default set of instruments can be defined by editing the following 
   set SSW_INSTR=hessi xray spex

   rem   If you are not using the default version of IDL, add a path below
   start idlde
To tailor this setup for your needs:
1.   Modify the values of SSW, SSWDB, and IDL_STARTUP if they don't point correctly to the top level of your SSW tree.
Note:  The IDL_STARTUP file is a crucial component to starting SolarSoft under Windows.  The routine itself, idl_startup_windows.pro, should NOT be modified.

2.   SSW_PERSONAL_STARTUP allows you to identify a personal startup file to run after all other startup and instrument setup files are run. You may want to define environment variables for local printers (PSLASER and PSCOLOR) or set personal preferences (like !quiet=1).  In the example, c:\user_dir is assumed to be your "user" directory - edit the line (i.e. remove the "rem" and specify the directory) if you want use a personal startup file.
Note 1: Any idl_startup.pro file in the directory you have set as your working directory will also be executed.
Note 2: You must not have the setssw_windows command in your personal startup file - this will start an infinite loop.

3.   You may choose your working directory by cd'ing to a directory. This directory will be the default location for any files that are created. Also, it will be first in the IDL path for searching for software. Edit the line (i.e. remove the "rem" and specify the directory) if you want to do this.

4.   You may define a default list of instruments for SolarSoft by specifying the environment variable SSW_INSTR - this modifies the default behaviour of the startup. The names used in the list should be the same as the names of the instrument-level branches in the SSW tree. When you make your SolarSoft installation, SSW_INSTR will be set to the list of instruments you requested - if you want to supress or change the list of instruments, edit the line in the file (i.e. insert a "rem" or edit the list).
Note: The example shows SolarSoft invoked with the HESSI analysis environment - HESSI analysis also needs the xray and spex branches as well as hessi.

5.   The sswidl.bat file will start the latest version of IDL as defined in the Registry. If you wish to use another version of IDL, modify the "start idlde" statement to include the path to the version you wish to use.  For example, you could use IDL 5.2 by changing this line to something like:

    start c:\rsi\idl52\idlde

6.   Move this sswidl.bat file (or whatever you have called it) to a directory not in the SolarSoft tree - this will ensure it is not overwritten if you re-install SolarSoft. We suggest using c:\idl_ssw.

You may create several version of the sswidl.bat file for running IDL in different environments, and you may also to create a shortcut to each on the Desktop.

If you do create a shortcut, the following properties are suggested: "hidden" under general; "Run minimized" and "Close on exit" under Program. The sswidl.bat file to be executed should be specified in the "Cmd line" under Program.

The SolarSoft Data Base (SSWDB)

A lot of the instrument related software in SolarSoft requires ancillary files that are held in the SolarSoft Data Base (SSWDB). These data may be installed on your system using the SSWDB Installation Form on the SolarSoft web pages. This creates a configuration file (setup.sswdb_upgrade) that you should copy to your system and store as directed. You can then use sswdb_upgrade to mirror the files from GSFC.

Note 1: The current software used to copy the SSWDB files mirrors the entire directory. Be aware that some of the datasets can be quite large.
Note 2: The sswdb_upgrade procedure uses information that is contained in c:\ssw\site\setup\setup.hostname - it is needed for anonymous FTP access. This file is generated from information provided when SolarSoft is installed - edit it if the hostname is incorrect.

Comparison between Windows and Unix SolarSoft Setup

Although we have attempted to make things as similar as possible, there are several differences in between running SolarSoft under Unix and Windows. These relate mainly to when and where IDL is configured to a particular selection of SolarSoft instruments. Under Unix, most things are done before, or as you enter IDL - under Windows, almost everything is done within IDL.

Under Unix, the SolarSoft environment is created using setup files that define environment variables, and startup files that execute procedures as IDL starts. The setup files can be found in the SSW tree in /setup directories under the gen, instrument and site directories - they have filenames of the form setup.xxx_path and setup.xxx_env. The gen and instrument level setup files define default values of variables; the site level files modify the defaults to allow for local differences in the location of files. The same files are used to create the SolarSoft environment under Windows - see the SolarSoft Setup web pages for more information on the files.

All the files that define the environment variables under Unix should work for Windows. However, when you enter SSW IDL under Windows you will normally only have the general part of the SolarSoft tree selected - you then need to select a set of instruments using setssw_windows.

The setssw_windows procedure is analogous the setssw script at the shell level in Unix, but executes everything within IDL. When the user selects one or more instruments, the setssw_windows procedure executes the setup.xxx_path and setup.xxx_env files in the instrument and site directories in the same order as the Unix script, makes addition to the path using ssw_path, and finally executes any startup files.

This approach has one great advantage over the way things are done under Unix. At any time you can add another instrument and all the necessary environment variables are created, all the required startup files executed, and all the necessary extensions to the path made. Under Unix it is often necessary to exit IDL and re-enter with a new set of instruments - this is not needed under Windows.

R.D. Bentley (YDAC/MSSL)
rdb@mssl.ucl.ac.uk