Running SolarSoft under Windows

HELP Information on Running SolarSoft under Windows

This page assumes that you have already created a SolarSoft installation on your Windows PC using the Installation Form on the SolarSoft web pages. A certain familiarity with SolarSoft is also assumed - see the SolarSoft Web pages if you need any information.

The SolarSoft Environment

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, everything is done within IDL.

Under Unix, the SolarSoft environment is created using setup files that define environment variables, and startup files the 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.

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.

There are two ways of invoking SolarSoft under Windows:

Simple way of Invoking SolarSoft

If you have a simple Windows environment, with SolarSoft and any required parts of the SolarSoft Database installed under c:\ssw and c:\sswdb, you can invoke SolarSoft by setting the "Startup file" file in the IDL Preferences to
   c:\ssw\gen\idl\ssw_system\idl_startup_windows.pro
Once IDL has started, an example of how to select the TRACE and Yohkoh/SXT branches would be:
   IDL> setssw_windows,/trace,/sxt      ; (or whatever)
The necessary SolarSoft routines should then be available to you to start your analysis...

Note: this method only works if the SSW tree is stored in the location assumed by the software (i.e. c:/ssw). If it isn't, or if you need greater functionality, follow the method detailed below:

Recommended Way of Invoking SolarSoft

Since there are several things you may want to change in your environment, the recommended way to use SolarSoft under Windows is by invoking IDL from a .bat file that defines a number of things related to the SolarSoft environment before starting IDL.

You can execute the .bat file (by default this is called sswidl.bat) by double-clicking on the file. (Under Windows98, you can also execute the .bat file by double-clicking on the shortcut supplied with the installation kit.- see below)

Initial Setup

A few things may need adjusting:
1) Examine the file sswidl.bat and modify it if necessary.

The sswidl.bat file is generated as part the installation kit that you download after using the SSW Installation Form - the first few items will have been set to correspond with your answer about the location of the SolarSoft tree. The file should be located in $SSW\site\setup, where $SSW is used to designate the root of your SolarSoft tree.

An example of sswidl.bat is given below, together with an explanation of the instructions:

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
set SSW_PERSONAL_STARTUP=c:\user_dir\idl_startup.pro

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

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

rem   If you are not using the default version of IDL, add a path below
start idlde

i) the environment variables SSW and SSWDB (that specify the location of the SolarSoft tree and SolarSoft DataBase) should have been set by the Installation Form - the example assumes that SolarSoft is rooted under c:\ssw. You may wish to modify SSWDB.

ii) the startup file used by IDL is defined by the environment variable IDL_STARTUP and should have been set by the Installation Form - the example assumes that SolarSoft is stored under c:\ssw

Only modify this definition if the value of root of SolarSoft is incorrect - this is a key component to starting SolarSoft under Windows - the routine idl_startup_windows itself SHOULD NOT BE MODIFIED.

iii) Since the location of the "home directory" is tenuous under Windows, and IDL_STARTUP is needed when invoking IDL, the SSW_PERSONAL_STARTUP environment variable allows a specific startup file to be identified by the user. In the example for SSW_PERSONAL_STARTUP, c:\user_dir is assumed to be your "user" directory. Note: Any idl_startup.pro file in the directory you have set as your working directory will also be executed.

iv) If you want to relocate to a particular directory to run IDL (i.e. define a working directory), put a "cd" statement in the sswidl.bat file so that you change to this directory as IDL starts. Any idl_startup.pro file located in this directory will be executed as a personal startup file.

v) It is possible to define a default list of instruments for SolarSoft by specifying the environment variable SSW_INSTR - this modifies the default behaviour of the startup. The example shows SolarSoft invoked with the HESSI analysis environment. Edit the line (i.e. remove the "rem") if you want to do this.

vi) 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:
   start c:\rsi\idl52\idlde
vii) 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. The shortcut assumes that this is c:\idl_ssw.
2) Enter the "Preferences..." option in IDL and ensure the "Startup File" field within Startup is blank - if anything is specified in this field, it will take precedence over the value of IDL_STARTUP.

If you are using a "cd" command in your sswidl.bat file to define the current directory, you also need to ensure that the "Working Directory" field within Startup is blank.

3) A shortcut to invoke SolarSoft under Windows98 is provided with the installation kit. It should be located in $SSW\site\setup and will have the appearance of an icon labelled SSWIDL (it might have the name SSWIDL.pif under some file managers).

Move the shortcut onto the desktop. If necessary, modify the program "Cmd line" of the shortcut if the sswidl.bat file is not located under c:\idl_ssw.

Running SolarSoft

1) Start SolarSoft by double-clicking on the sswidl.bat - this will execute the .bat file and start IDL. (Under Windows98, you can achieve the same by double-clicking on the the SSWIDL shortcut)

The following files (if they exist) will be executed as IDL starts:

     $SSW\gen\setup\setup.ssw_env
     $SSW\site\setup.ssw_paths
     $SSW\site\setup.ssw_env
     $SSW\site\setup\IDL_STARTUP
     any personal idl_startup file
      (as defined by environment variable SSW_PERSONAL_STARTUP, 
         or located in the current directory)
2) You may select the required instruments, or add to an existing selection, by using setssw_windows:
   IDL> setssw_windows,/sxt,/trace
Mission and instrument level setup files (setup.xxx_paths and setup.xxx_env) and idl_startup files will be executed; any site and personal idl_startup files will be repeated.
3) Use SolarSoft as normal. Remember, you can verify the value of !path in your current SolarSoft environment using pr_path.

Tailoring the setup

It is possible to have a variety of sswidl.bat style files and associated shortcuts - each can be tailored for a different configuration of SolarSoft.

The example above shows SolarSoft invoked with the HESSI analysis environment. It you wanted to analyse SXT and TRACE data, set the environment variable to:

   set SSW_INSTR=sxt trace
If you are creating your own 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.

It is also possible to set a default set of instruments by including a setssw_windows command (with the desired set of instruments) in a personal IDL startup file, rather than using a "set" command in the sswidl.bat file.


R.D. Bentley (YDAC/MSSL), 30 May 2000
rdb@mssl.ucl.ac.uk