Loving ISIS - Confessions of a Former XSPEC User

 

The purpose of this page is to give a pretty thoroughly worked example of using ISIS to fit a multi-wavelength data set consisting of radio data, plus RXTE data (PCA and HEXTE, jointly fit with the radio). It's going to make heavy use of my own ISIS startup files, which you can download here. My ISIS startup files are designed to give a little aid, comfort, and familiarity to those who, like me, used to be heavy XSPEC users. I'll try to be good in that any command listed that isn't 'standard' ISIS will be listed in italics. But that's the beauty of ISIS - as we'll talk about below, ISIS 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. I promise you won't regret it.

UPDATE!


These pages need some serious updating, which I don't have time for in the near future. However, since the last update of these pages, I have greatly expanded my .isisrc files. They are much improved, including nicer, friendlier, plots. They now have toggles for lots of different units: mJy, ergs, Watts, X-axis in either velocity or redshift relative to a reference point (wavelength, keV, GHz, ...). Plus they allow one to dump out ASCII files of the data.

Likewise, I have added things like "gain" shifts (done as a convolution model), "background correction" (a better, IMHO, version of the XSPEC corrfile procedure - none of this iterative fitting process, it's fit simultaneously with the rest of the model), using a background substracted spectrum as a background for a different spectrum, improved grouping (grouping by S/N and minimum number of channels per bin with the latter as a function of energy - this has allowed me to group Suzaku data to HWHM from 0.5-10 keV) and probably lots of things that I am forgetting.

So, rather than let these functions sit in my private directories, waiting for the day I update these web pages, I now place them here:

A tar'd, gzipped, copy of MY ISISRC FILES.

The catch is, of course, you'll have to look at the files themselves, and the usage functions, to see what's really there and how to use them. But until that day comes, they'll be available at the above link.

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 incorporated quickly (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.

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 also 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. Personally, I find programming ISIS via S-lang to be a heck of a lot easier than programming XSPEC via TCL.

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. I've got a friend, who shall otherwise remain nameless, who by combining Perl, TCL, and IDL scripts has done some quite powerful things with XSPEC. With that amount of effort, however, I shudder to think what he could have accomplished with the much more straightforward and powerful S-lang scripting of ISIS.

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 programming guru can get it to do awesome things. My scripts that I present 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 that programmability.


This page was last updated Aug 13, 2008 by Michael Nowak. To comment on it or the material presented here, send email to mnowak@space.mit.edu.
Valid HTML 4.01! Made with JED. Viewable With Any Browser.