21 | 05 | 2019
 
 
July 2 X-ray Spectroscopy Materials PDF Print E-mail
Materials for X-ray Spectroscopy Exercises, Part I
Friday, July 2, 2010
We will be conducting two exercises, concentrating on loading and visualizing the data in both ISIS and XSPEC.  We will primarily focus on understanding the features introduced by the detectors, and discussing model independent measurements of things like flux.
 
ISIS Practice Exercise
  • This exercise, along with Part II on Monday, will roughly follow the analysis outlined on these web pages. We will use both the RXTE (PCA & HEXTE) data discussed on those pages, as well as the main script (.isisrc*) files found on those pages.
  • The script files are in a compressed, tar file (isisrc.tar.gz) which can be obtained directly from here. Unpack these files into your home directory, and edit the path variable found in the main .isisrc file proper.  Note:  these files are required for a number of the exercises (today, Monday, and the Timing Exercises on Wednesday).   Thus you'll find links to this tar file in a few places.  There's only one set of files, so you only need to download these once.  (The Timing Exercises require additional downloads.)
  • The data for the above exercise can be downloaded directly from the gzipped, tar file (data.tar.gz), found here.
  • Here is the PDF outlining this practice exercise.
XSPEC Practice Exercise
  • This exercise will make use of a set of spectra from BeppoSAX observations of the black hole candidate Cyg X-1. A link to the gzipped, tar file (cygx1_hard_.tar.gz) is found here.
  • The PDF describing the practice exercise is found here.
 
TESTING YOUR SOFTWARE SETUP
  •  Assuming that you've installed HEASOFT and ISIS and the ISIS scripts according to the install instructions, and you have downloaded the data above, do the following to test your setup.
  • Unpack the data in a working directory, e.g., ~/TEST, go to this directory, and do the following commands (C-shell version shown - modify as necessary for other shells, and set path names to the appropriate ones for your setup)

prompt%> setenv HEADAS /usr/local/src/heasoft-6.9/i386-apple-darwin10.4.0/

prompt%> source $HEADAS/headas-init.csh

prompt%> xspec
You will now see something like what shown below. The following are xspec commands.  When prompted for a response, just enter blank returns:

                XSPEC version: 12.6.0
        Build Date/Time: Tue Jun 22 11:56:06 2010

XSPEC12> cpd /xs
XSPEC12> data pca.pha
(... various output ...)
XSPEC12> model powerlaw
(... a couple of blank returns required, followed by output ...)
XSPEC12> query y
XSPEC12> fit
XSPEC12> plot ld del
  • If you see data plot with residuals, congratulations, you have a working version of XSPEC!  (Don't worry that the fit at this point is absolutely terrible.  The goal is to make sure that the program works.)
  • Now, let's test ISIS.  Unpack the isisrc.tar.gz file in your home directory
  • Edit the .isisrc file, and change the line:
static variable path="/Users/mnowak/";
  • Edit the line to correspond to your home directory.
  • cd back to the directory with the data, e.g., ~/TEST
  • Running the unix which command on isis, should give you something like:
prompt%> which isis
/usr/local/bin/isis
  • If you don't have that, then you haven't placed /usr/local/bin in your path, or you haven't downloaded ISIS yet.  Do one or both.  Assuming that you have, then do:
prompt%> isis

Welcome to ISIS Version 1.6.0-16
Copyright (C) 1998-2010 Massachusetts Institute of Technology

          Isis web page: http://space.mit.edu/cxc/isis/
   Mailing list archive: http://space.mit.edu/cxc/isis/archive/
 Send questions to the mailing list: .
     For a summary of recent changes, type:  "help changes"

isis> load_data("pca.pha");
RMF includes the effective area
1
isis> fit_fun("powerlaw");
isis> fit_counts;
 Parameters[Variable] = 2[2]
            Data bins = 129
           Chi-square = 8131.856
   Reduced chi-square = 64.03036
0
isis> rplot_counts(1);
isis> plot_counts(1;res=2);
isis> exit;
  • If the above produced a couple of plots, then congratulations, you have a working version of ISIS and are good to go!