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. ISIS provides several 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.)
Being somewhat more used to the FTOOLS approach using grppha(id,mincounts);
grppha_cut(id,mincounts,minkev);
grppha_min(id,mincounts,minchans,minkev);
grppha_sn(id,minsn,minkev);
grppha_sn_min(id,minsn,minchans,minkev);
grppha_sys(id,minsn,sys,minkev);
For the purposes of this example, there are two that we care about:
Ignoring Data: ISIS has a number of intrinsic functions:
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
I have made my own function: kev_note([id],[lo],[hi]);,
which is similar to xnotice_en, except that [lo]
and [hi] can be arrays with lo/hi energy bounds, and any
bin with zero counts is also ignored. (I have also written
chan_note to work via channel numbers instead.)
For the purposes of this example, the grouping and noticing commands were run as follows:
set_systematics(pca_id,[0],[50],[0.005]);
grppha_cut(pca_id,30,3.);
kev_note(pca_id,3.,22.);
grppha_sn(hexte_id,20.,18.);
kev_note(hexte_id,18.,200.);
My function |
This page was last updated Mar 22, 2006 by Michael Nowak. To comment on it or the material presented here, send email to mnowak@space.mit.edu.
![]()