Loving ISIS - Confessions of a Former XSPEC User


Grouping the Data

ISIS has the ability to dynamically group a spectrum during an analysis session. You're not just rebinning the plots, you're rebinning the data. This is a very powerful ability. With great power, however, comes great responsibility. ISIS expects you to rebin your data during the analysis session; therefore, it ignores any default binning in the FITS file header (unless you set Isis_Use_PHA_Grouping=1)!

The function I use most often for rebinning the data is:

This is a very versatile function that will take multiple data sets on a common energy/wavelength grid and group them identically using multiple criteria, such as minimum signal-to-noise and minimum number of channels, each as a function of energy or wavelength bounds. Furthermore, it allows you to do fancier things such as identically group multiple data sets, but use only a subset these data sets in the signal-to-noise calculation.

For the purposes of this example, we employ a simple call to this function, e.g.,

In this instance, we have grouped the PCA data to a minimum signal-to-noise of 5.5 (roughly 30 counts per channel in the regions of the spectrum with low background), for channels 3 keV and above. This grouping can be changed at any point during the analysis if one desires. This is a very powerful feature of ISIS, and eliminates the need to create multiple copies of a PHA data file, or to exit the data session, run grppha, and then restart the analysis.

In the above you will notice that function options were passed via qualifiers, which, following a semi-colon, have the form of name=value. A number of ISIS functions use qualifiers to pass values. There are several advantages to qualifiers: they are order-independent, any undefined qualifiers are simply ignored, and they typically have defined default values so only those that are to be changed need to be entered. Throughout this example you will see a number of commands (both ISIS intrinsics and script-defined functions) that take qualifiers as their inputs.

ISIS provides several other intrinsic functions for rebinning data, among which are:

     group_data(id, factor);     % Group data by number of channels
     rebin_data(id, # or array); % Group data by minimum counts (or using array)
These functions start at short wavelength and follow a wavelength ascending order. Additionally, with the use of the intrinsic function set_rebin_error_hook, they allow you to control how error propagation is handled. (ISIS pretty much gives you full control over errors and statistics - but that is a topic for a later page.)

Ignoring Data

The function that I use most often is:

This function only notices data between the ranges lo1...hi1, lo2...hi2, etc., with all other data being ignored. The units of these bounds are specified by the unit qualifier. As for the group command, this function can operate simultaneously on multiple datasets that share a common energy/wavelength grid. Here, for example, we notice only the 3-22 keV PCA data via the command:

ISIS has a number of other intrinsic functions for ignoring/noticing data, among which are:

     ignore(id);         % Ignore dataset id
     notice(id,a,b);     % Notice wavelength range [a,b] in dataset id
     notice_en(id,a,b);  % Notice energy range [a,b] in dataset id
     xnotice(id,a,b);    % *Only* notice wavelength range [a,b] in dataset id
     xnotice_en(id,a,b); % *Only* notice energy range [a,b] in dataset id
     exclude(id);        % Don't change the ignored/noticed channels, but
                         % exclude the whole data set until reinstated with:
     include(id);        % Reinstate the data with prior excluded channels

Next up: Systematic Errors and Custom Statistics

This page was last updated Oct 7, 2013 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.