Loving ISIS - Confessions of a Former XSPEC User | ||
|
Loading the Data: Before we begin with loading the data, we want to make sure we can easily figure out what data files are already loaded into ISIS. Setting the ISIS variable:
Isis_List_Filenames=1;
will make sure that every time you do a list_data; call, you
see such things as background file names, etc., listed. The above is
the default in my .isisrc, and for convenience I also have
taken
list_data; list_rmf; list_arf;
and placed them in a single function list_all;
The basic ISIS function for loading data is:
public define load_all(a)
{
variable b = load_data(a);
variable d = fits_read_key(a,"backfile");
() = define_bgd(b,d);
return b;
}
ISIS is also expecting to find the data exposure set in the ARF (as is
the FITS standard); however, here we are using canned HEXTE
ARFs. Thus, I have written a short function
load_hexte("filename"); that gets the exposure from the data
file, and then assigns it to the ARF.
Additionally, two defined functions: radio = read_radio("filename",#);
id = load_radio(radio);
Note that all of the above functions assign ID numbers to the
datasets, responses, and ARFs. Owing to the fact that the radio has
neither an RMF nor ARF, and that the PCA data only has a combined
RMF/ARF, the dataset ID numbers are not identical to the RMF and
ARF ID numbers. There are ISIS Thus, for this example, the data loading sequence was:
radio_data = read_radio("radio.data",50);
radio_id = load_radio(radio_data);
pca_id = load_all("pca.pha");
hexte_id = load_hexte("hxt.pha");
Use of the list_all; function then produces:
Current Spectrum List: id instrument m prt src use/nbins A R totcts exp(ksec) target 1 0 0 0 2/ 3 - - 1.1119e+00 0.001 2 PCA 0 0 0 129/ 129 - 1 7.5787e+06 10.528 GX_339-4 file: pca.pha bgd: pcaback.pha 3 HEXTE 0 0 0 256/ 256 1 3 8.5617e+05 5.883 file: hxt.pha bgd: hxtback.pha Current RMF List: id grating detector m type file 1 PCU0 0 file: pcaresp.rmf 2 PWA 0 file: hxt.rmf Current ARF List: id grating detector m prt src nbins exp(ksec) target 1 HEXTE 0 0 0 970 5.88 file: hxt.arfWith four command lines, we have loaded three data sets, including a radio data set from and ASCII file. The radio data can be plotted and fit simultaneously with the X-ray data set, with the X-ray portion of the fit being properly carried out in 'detector space'. (I.e., no unfolding will be involved in fitting the X-ray data.) Important Note: You might see ISIS throw off a number of warning messages concerning the response files. Unfortunately, it is sadly common for software from many different satellite missions to create responses that are not fully compliant with accepted FITS standards. Without naming names, such problems as negative energy bin boundaries, overlapping bin boundaries, non-sequentially spaced energy bins, etc., have cropped up in various data set response files. Equally unfortunately, it has been the practice of XSPEC to hide this from the user by quietly making internal corrections to the responses.Whereas many of these response issues ultimately have been harmless, the fact that XSPEC silently fixes (and/or ignores) them has removed a lot of the impetus for the software teams to "get it right" in the first place. ISIS will do some corrections, and then warn you. It is not as tolerant of bad responses as is XSPEC. ISIS will fail to read especially poorly written response files. For these cases, one can "fix by hand" the affected response (e.g., by using FTOOLS or DMTOOLS), or one can complain to the mission that created the response software. Next up: Grouping Data |
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.
![]()