Installing Solarsoft on a Mac

This guide is for an installation of Solarsoft IDL on a Mac. However, the steps are valid for any Linux/Unix machine except for the final one about Launch Daemons.

Step 1 - basic installation

Go to the Solarsoft Installation form at LMSAL. For the drop down list 'SSW Path Suggestions' select '$HOME/ssw'.

Do not click on any of the options boxes for instruments. Instead go straight to the 'Generate installation script' button and click on it. Download the script to your computer and run it with:

> csh -f [script_name]

This will download the files for the basic SSW installation, and you should see the folder 'ssw' appear in your home directory.

Step 2 - run SSW IDL

Go to your .cshrc or equivalent file in your home directory and add the following lines to it:

setenv SSW $HOME/ssw
setenv SSW_INSTR  "chianti eis sot xrt cds sumer aia hmi eve secchi hessi xray spex iris eit trace"
setenv SSW_SITE_SETUP $SSW/site/setup
alias sidl ~/scripts/sidl

The environment variable $SSW_INSTR is the one that determines which instrument paths will be added to your SSW.

Noting the alias that you have defined, now create a new file called simply 'sidl' and put it in the directory 'scripts'. This file should contain the following lines:

source $SSW/gen/setup/setup.ssw

If you now source your .cshrc file and do:

> sidl

your Solarsoft IDL session should start up.

Step 3 - perform first update of SSW

Now we want to update SSW for the first time, which will download all the instrument paths defined by $SSW_INSTR. Go to your ~/scripts folder and create a new file called 'update_ssw'. Put the following lines in this file:

$SSW/gen/bin/ssw_batch go_update_ssw $SSW_SITE_SETUP/update_ssw.log

Now execute this script with:

> csh -f ~/scripts/update_ssw

which will download all the files for your instrument list. This should take a long time (perhaps a few hours), and you can check progress by taking a look at the file ~/ssw/site/setup/update_ssw.log.

Step 4 - setting up an automatic SSW update

The easiest way to do this is with a cron job, however Apple recommend to implement these sorts of jobs through Launch Agents and Daemons. It's possible that cron may be disabled in the future, but it still works with MacOS 10.12 (Sierra). I suggest trying the Launch Daemon first, and then using cron if it fails.

Cron job

Open the cron file by doing:

> crontab -e

and insert the line:

30 12 * * * ~/scripts/update_ssw

which tells the computer to run the script at 12:30 every day.

Launch Daemon

It's first necessary to create a property list (plist) file. The one I use for updating SSW is available here. Copy it to the directory $HOME/Library/LaunchAgents on your Mac, and rename it 'com.ssw.plist'.

Now open this file with an editor, and you should see the line:


This is pointing to the location of the script that updates SSW (see Step 3 above), and should be edited to your own upgrade script.

Further down the file you should see a tag for 'Minute' with a value of 15, and another tag for 'Hour' with a value of 12. These mean that the script will be called at 12:15. Since no other time information is specified then the script will be run every day at this time.

Further information about Launch agents and plists are available from an Apple webpage.

The script should start automatically, but you may need to restart your computer. I suggest setting the update time to shortly after your current time and then you should see the script start, e.g., by checking the ~/ssw/site/setup/update_ssw.log file.

Note: I was able to get this working on my MacBook, but it failed on my iMac. I don't have admin privileges on my iMac, so this may be the problem.

Page maintained by Dr Peter R Young.