Loving ISIS - Confessions of a Former XSPEC User

 

MULTI-SPACECRAFT SPECTRA LOVELY CLUSTER
Left: Multi-spacecraft observation of Cyg X-1, fit and plotted with ISIS. Parallelization and caching methods in ISIS allowed a factor of 20 speed up when run on a four core machine. Right: Temperature map of the Perseus cluster, consisting of over 100,000 fits performed with ISIS parallelization methods. (Cluster fits and figure by Mike Wise.)

Introduction

The purpose of this page is to present a thorough example of using ISIS to fit a multi-wavelength data set consisting of radio and X-ray data (RXTE-PCA and -HEXTE) which we will jointly fit. (To jump right to a one-page quick ISIS analysis example, see the quick summary.) These analyses make use of some scripted ISIS functions found in my ISIS startup files. These scripts are downloadable from here and are designed to give a little aid, comfort, and familiarity to those who, like me, used to be heavy XSPEC users. (Any command listed on these pages that isn't 'standard' ISIS will be shown in italics.) But that's the beauty of ISIS - it can be easily programmed and aliased to be virtually anything you want it to be. So sit back, enjoy the ride, and throw off the shackles of XSPEC once for all!

Why ISIS?

In one sentence: ISIS gives you all the models of XSPEC, with much of the programmability of IDL or MATLAB. Let me repeat that: ISIS gives you all the models of XSPEC, with much of the programmability of IDL or MATLAB. And when I say all the XSPEC models, I really mean it. Multiplicative, additive, and convolution models; APEC models; table models; even XSPEC local models. And incorporating your own models is easy. Simple models like this one can be added (without leaving the ISIS program!) by writing it in S-lang, while more complex models can be written in Fortran, C, or C++, and then imported as a module (without recompiling ISIS!) with the use of the SLIRP code generator.

Really, Why ISIS?

In a second sentence: ISIS offers transparent parallelization of fits and error bar searches. XSPEC essentially offers no parallelization. Sherpa has limited support for parallelization of error bar searches. Only ISIS offers parallelization of fits, error bar searches, and model evaluations (see pmodel, for example) on either a single multi-processor machine or on a heterogeneous network of machines (i.e., a network made up of machines running different operating systems). Using a single multi-core system, parallel fitting and error bar searches are transparent yet controllable. (The number of cores utilized, and the niceness level of the spawned process, are settable parameters. The parallelized error bar search also is sophisticated enough to automatically redo the fit and restart the parallelized error bar search should a new, lower chi^2 value be found.) Coupled with the unique ISIS feature of fit function caching (described elsewhere on these pages), I have achieved factors of 20 speed up for error bar searches performed on a single, four core machine.

Programmability:

ISIS can be scripted using the S-lang programming language. Essentially every ISIS command is a S-lang command, and can be incorporated into a script. S-lang is especially powerful when it comes to vector math, similar to IDL or MATLAB. Unlike Python, for example, vector math is intrinsic to the S-lang language.

Is S-lang inherently better than these other scripting languages? I'm of the firm belief that a sufficiently talented programmer can get by in almost any language. However, to any astronomer already used to IDL or MATLAB, programming in S-lang is very straightforward.

And that's the point, really, isn't it? A pretty basic programmer like myself can get ISIS to do a lot of things without having to be a programming wizard, while a sophisticated programmer can get it to do awesome things. The scripts presented here are by no means meant to represent optimal or elegant solutions. But they get the job done, and they weren't that hard to produce. ISIS is a spectral fitting package that the vast majority of astronomers can use to create powerful programs. This page is meant to give a short, practical introduction to some of those abilities.

Next up: ISIS vs. XSPEC


This page was last updated Oct 21, 2020 by Michael Nowak. To comment on it or the material presented here, send email to mnowak@physics.wustl.edu.
Valid HTML 4.01! Made with JED. Viewable With Any Browser.
MIT Accessibility