About Chandra Archive Proposer Instruments & Calibration Newsletters Data Analysis HelpDesk Calibration Database NASA Archives & Centers Chandra Science Links

Skip the navigation links
Search In:   
Last modified: 15 December 2005
Hardcopy (PDF): A4 | Letter

Calculate Exposure Time for a Single Line Detection using ACIS-S/HETG


Contents



Preliminary Information

Please note that although RPS forms and roll/visibility results have been updated for Cycle 8, this thread uses calculated values based on Cycle 7 effective area curves. The steps you need to take to complete the thread are the same for this cycle, however you may see slight differences in numerical results if you use Cycle 8 curves. If you have any questions about the results you get by following this thread, please contact the HelpDesk.

This thread gives a simple example of a grating observation. The example is an HETG+ACIS observation of the X-ray dipper 4U xxxx-xx. We would like to determine the exposure time needed to make a 5 σ detection of hydrogen-like Ne at 0.9-1.3 keV with a flux of 2.0e-5 photons cm^-2 s^-1.

If the target has already been observed, additional observations must be justified. To determine if any previous observations exist, you can use Web ChaSeR, available at http://cda.harvard.edu:9011/chaser/mainEntry.do. Enter the RA and Dec of the object and verify that these boxes are checked: Archived, Observed, Partially Observed, Scheduled, and Unobserved. These are not checked by default, so you will need to check them.

Check the pitch angle of this target using obsvis. Some targets may be impossible or difficult to schedule (see the section on Avoidances in the Proposers Observatory Guide

In order to work through this thread, you will have to have CIAO installed on your system. In addition, you will need to download the Cycle 7 instrument responses for HEG and MEG orders 1 and -1.



Determine a Reasonable Source Spectrum

For the source used in this thread, the X-ray flux is periodically variable, undergoing dips on the orbital period. The science goals require us to simulate the persistent state in order to determine an appropriate exposure time for the detection of hydrogen-like Ne.

For the object in this thread, data from ASCA were fit with an absorbed power-law model. For the persistent state, we find the spectrum can be fit with an absorbed power-law with N_H = 3.2e21 cm^{-2}, gamma =1.85, and a 2-10 keV flux of 2.2e-10 ergs cm^-2 s^-1.



Simulating Spectra

We need to simulate spectra in order to determine the appropriate observing length and technical feasibility of our proposed observation.

Below is a series of ISIS commands that will simulate HEG and MEG plus and minus first order spectra. Before running these steps, you should have downloaded the appropriate files from the Cycle 07 Grating RMFs/ARFs page.

First, start ISIS and load the appropriate ARFs and RMFs For HEG and MEG.

unix %  isis
Welcome to ISIS Version 1.2.4
Copyright (C) 1998-2004 Massachusetts Institute of Technology

isis> hrmfp=load_rmf("aciss_heg1_cy07.grmf");
isis> hgarfp=load_arf("aciss_heg1_cy07.garf");
isis> hrmfm=load_rmf("aciss_heg-1_cy07.grmf");
isis> hgarfm=load_arf("aciss_heg-1_cy07.garf");
isis> mrmfp=load_rmf("aciss_meg1_cy07.grmf");
isis> mgarfp=load_arf("aciss_meg1_cy07.garf");
isis> mrmfm=load_rmf("aciss_meg-1_cy07.grmf");
isis> mgarfm=load_arf("aciss_meg-1_cy07.garf");

isis> list_rmf;

Current RMF List:
 id grating detector    m type   file
  1    HETG   ACIS-7    1 file:  aciss_heg1_cy07.grmf
  2    HETG   ACIS-7   -1 file:  aciss_heg-1_cy07.grmf
  3    HETG   ACIS-7    1 file:  aciss_meg1_cy07.grmf
  4    HETG   ACIS-7   -1 file:  aciss_meg-1_cy07.grmf

isis> list_arf;

Current ARF List:
 id grating detector   m prt src   nbins  exp(ksec)  target
  1    HETG     ACIS   1  1   0     8192    24.64  IM PEG
  2    HETG     ACIS  -1  1   0     8192    24.64  IM PEG
  3    HETG     ACIS   1  2   0     8192    24.64  IM PEG
  4    HETG     ACIS  -1  2   0     8192    24.64  IM PEG

We next initialize four datasets (one for each arm (+/- order) of heg and meg, identified with numbers 1-4), which we will later populate with the 'fakeit' command.

isis> assign_rsp(hgarfm, hrmfm, 1); 
isis> assign_rsp(hgarfp, hrmfp, 2);
isis> assign_rsp(mgarfm, mrmfm, 3);
isis> assign_rsp(mgarfp, mrmfp, 4);

We will start with a 35ks exposure time. Adjust the exposure time by changing the ARF value for all four datasets.

isis> set_arf_exposure ([1:4], 35000);
isis> list_data;

Current Spectrum List:
 id    instrument   m prt src    use/nbins   A   R     totcts   exp(ksec)  target
  1                -1  0   0    8192/ 8192   2   2  0.0000e+00    35.000  
  2                 1  0   0    8192/ 8192   1   1  0.0000e+00    35.000  
  3                -1  0   0    8192/ 8192   4   4  0.0000e+00    35.000  
  4                 1  0   0    8192/ 8192   3   3  0.0000e+00    35.000  

Next we define the spectral model to be used. In this case, we use the XSPEC phabs and powerlaw models.


isis> require("xspec");
isis> fit_fun("phabs(1)*powerlaw(1)");

Next we need to set model parameters. The nH is set to 0.32 (3.2e21 cm^-2), and the photon index set to 1.85. The normalization is initially set to 1.0, then we will re-normalize to produce a model with a flux equal to that measured by ASCA. Please refer to the point source thread for another example of how to re-normalize a spectrum.

isis> list_par;
phabs(1)*powerlaw(1)
 idx  param             tie-to  freeze         value         min         max
  1  phabs(1).nH            0     0                1           0      100000  10^22
  2  powerlaw(1).norm       0     0                1           0       1e+10  
  3  powerlaw(1).PhoIndex   0     0                1          -2           9  

isis> set_par(1,0.32); 
isis> set_par(3,1.85);

Here we refer to parameters by their index number, indicated in the output of list_par. Once the parameters are set, fake the data. The datasets now contain the faked data.

isis> fakeit();
isis> list_data;

Current Spectrum List:
 id    instrument   m prt src    use/nbins   A   R     totcts   exp(ksec)  target
  1                -1  0   0    8192/ 8192   2   2  4.3419e+05    35.000  
  2                 1  0   0    8192/ 8192   1   1  4.0710e+05    35.000  
  3                -1  0   0    8192/ 8192   4   4  8.4604e+05    35.000  
  4                 1  0   0    8192/ 8192   3   3  8.9175e+05    35.000  

The next set of commands give a simple script which calculates the energy flux (in ergs cm^-2 s^-1) and photon flux (in photons cm^-2 s^-1) for the model spectrum.

isis> hc = 6.626e-27 * 2.998e18;
isis> d  = get_model_flux( 3 ) ;
isis> f = d.value;
isis> w = 0.5* (d.bin_lo + d.bin_hi ) ;
isis> photon_flux = sum( f ) ; 
isis> energy_flux = sum( f *( hc/w ) );
isis>  print(energy_flux);
4.64441e-09
isis>  print(photon_flux);
0.997579

The flux in the current model is 4.64441e-09 ergs cm^-2 s^-1. To obtain a flux equal to that of the ASCA value of 2.2e-10 ergs cm^-2 s^-1 we set the power law normalization to be 2.2e-10/4.64441e-09=0.047, and fake the data again.

isis> set_par(2,0.047);
isis> fakeit();

Plot faked fourth data set.

isis> plot_data_counts(4);
 Graphics device/type (? to see list, default /XSERVE):

The current faked fourth data set should look like this plot [Link to Image 1].

The faked data do not contain a Gaussian line. Therefore fitting with a model which has a Gaussian component will give a lower limit for the detectable line flux. To determine the sensitivity of this data to line detection, we modify the model to include a Gaussian at a fixed wavelength and width (both in Angstroms), and allow the flux of the line to vary. We may also want to bin this data before trying to detect lines.

isis> fit_fun("phabs(1)*(powerlaw(1)+gauss(1))");
isis> list_par;
phabs(1)*(powerlaw(1)+gauss(1))
 idx  param             tie-to  freeze         value         min         max
  1  phabs(1).nH            0     0             0.32           0      100000  10^22
  2  powerlaw(1).norm       0     0            0.047           0       1e+10  
  3  powerlaw(1).PhoIndex   0     0             1.85          -2           9  
  4  gauss(1).area          0     0                1           0           0  photons/s/cm^2
  5  gauss(1).center        0     0               12           0           0  A
  6  gauss(1).sigma         0     0            0.025           0           1  A

To set the Gaussian parameters, specify the parameter index, its value, whether the parameter is frozen (0 free, 1 frozen), if free: a min and a max value. The line we are interested in has a wavelength of 12.13 Angstrom and a width of 0.08 Angstrom; those parameters are frozen. We also freeze the continuum parameters.

isis> set_par(4,1e-3,0,0,1);  
isis> set_par(5,12.13,1);
isis> set_par(6,0.08,1);  
isis> freeze(1,2,3);  
isis> fit_counts;
 Parameters[Variable] = 6[1]
            Data bins = 32768
           Chi-square = 7276
   Reduced chi-square = 0.2221
0

Determine the confidence limits on the flux of the line. This could take a little work as local minima are easily found and must be avoided. If the output reads "**** Found improved fit", you will need to run conf again. This may need to be done many times in order for ISIS to find the best fit. When the global values are found, the output will issue a warning (isis wants to search below 0, which is not necessary), and the minimum and maximum values will be different.

isis> conf(4);
Found improved fit, stat= 8452.35 for param[4] = 4.96582e-06
**** Found improved fit
4.96582e-06
4.96582e-06

Output after some iteration:  

**** Parameter range endpoint 0 is inside the confidence limit
**** Lower confidence limit didn't converge[4]:  allow wider parameter ranges?
2.6584e-05
0

The lowest flux that could be detected is therefore 2.6584e-05 photons cm^-2 s^-1. The chosen 35ks exposure time is adequate to detect the line of interest. A more rigorous approach is to simulate multiple lines of interest and fit for them, reducing the flux until the lines are no longer reliably detected.

From previous missions, we have estimated that the source is in its persistent state approximately 75% of an orbit. Therefore to get 35 ks of persistent data, we require 50 ks of observing time. This would produce approximately 35 ks of persistent state data, from which we can detect line features of comparable strength to those seen in other X-ray dippers.



Check for Pileup

High count rate sources can be subject to pileup even in grating data. Given the dispersion of the gratings, this pileup can affect only a limited wavelength range, particularly where the effective area is the greatest. To estimate if a grating observation will be subject to pileup, one should estimate the counts per frametime per ACIS detection bin. To do this, you will need the exposure time and frametime. Also, the data should be grouped by 6 bins to approximate the ACIS detection bin. Below is a series of ISIS commands that will take the faked data and output a plot that gives the counts per frame per ACIS detection bin as a function of wavelength. Below 0.01, pileup is negligible (below red line). Between 0.01 and 0.1 (area between lines), pileup will produce changes in event rates less than 10%; for values much above 0.1 (above green line), pileup can be severe and the data quality dubious. By changing the frametime variable, one can assess the appropriate frametime for the observation to avoid pileup effects.

For this observation, we decided to use a 512-row subarray with a frametime of 1.8 seconds. This will eliminate some of the dispersed photons, but will not have an effect on the parts of the spectrum we are most interested in.

First we apply the grouping and declare some isis variables.

     group_data([1:4],6);

     variable frame_time = 1.8;  
     variable expos = 35000;
     variable no_frames = expos/frame_time;     

Next we open a file for a color plot and define the y axis.

     open_plot("pileup_check.ps/cps");
     ylog; 
     yrange(1e-3,1);

For each of our four datasets, we will plot the counts/frame/bin vs. wavelength. We also plot two solid reference lines to facilitate visual inspection of pileup effects. View the results here.

     variable i;
     for (i = 1; i <= 4; i++)
     {
     	variable c = get_data_counts(i);
     	c.value = c.value/no_frames;
	label("Wavelength","Counts/frame/bin","");
     	hplot(c);
	oplot([0,100],[0.01,0.01]);
	oplot([0,100],[0.1,0.1]);
     }
     close_plot;


Check if a Sim-Z Offset is Needed

If a subarray is necessary to reduce or eliminate pileup, it may also be necessary to apply a pointing offset. This is particularly necessary for HETG observations where the dispersion arms can fall off of the chips when using a subarray. See, http://space.mit.edu/ASC/calib/hetgsubarray.html for more information. In a previous section, we have determined that we will use a custom subarray containing rows 1-512 in order to keep the pileup at a reasonable level.

Without an offset, the grating arms are only partially falling on the subarray, as shown in this image [Link to Image 2]. We decide we need a SIM-Z pointing offset of -6.10mm (-2.082 arcmin), as shown in the second diagram [Link to Image 3]. You can use the downloadable ObsVis tool packaged with CIAO to aid in determining whether an offset is needed. For more information, refer to the ObsVis ahelp.



Avoid Chip Gaps

It is also necessary to ensure that interesting features do not fall into chip gaps. See POG table 8.2 to determine whether you have an interesting line falling on a chip gap. In this table, there are two energies depicting the span covered by the chip gaps for each grating. For example, at -0.33 arcmin Y offset, the gap between chips S2 and S3 will span energies from 3.562 keV to 3.818 keV in the MEG arm, and from 7.118 keV to7.630 keV in the HEG arm. If the line you are interested falls in either of these ranges, you will need to determine an appropriate Y offset.

The line we are interested in for the sake of this thread is at 1.02 keV. In examining the table, we use the row corresponding to the default Y offset of -0.33 arcmin and see that 1.02 lies within the S0-S5 chip boundaries and that it does not fall into any of the chip gaps. Therefore, we can use the default offset for our observation.



Estimate Count Rate

We use PIMMS to estimate count rates for the proposal. Using the input unabsorbed flux (input energy 2 to 10 keV), with Galactic nH = 3e21, Photon index = 1.85 and unabsorbed flux = 2.5e-10, we find a 0th order count rate of 5.472, and first order 6.134. We round up a bit to account for 2nd and higher orders, and get a total count rate of 12.

The output for 0th order can be viewed here [Link to Image 4], and first order here [Link to Image 5].



Complete Target Form

For general instructions on how to submit a proposal, please see the "Using RPS to Prepare and Submit a Chandra Proposal" thread.

It should be noted that the target keywords have been updated for Cycle 7. The list has been expanded from previous editions, and now has many keywords in common with the HST list. Choose as many target keywords as you feel are appropriate: this will aid in properly matching proposals to review panels during the Peer Review. Our final observing parameters are:

    * Total Observing Time (ksec) -- 50
    * Count Rate (zero order) -- 5.472
    * Count Rate (first order) -- 6.134
    * Total Field Count rate -- 12
    * Subarray Type -- Custom
	Rows 1-512
    * Instrument -- ACIS-S
    * Grating -- HETG
    * Y- offset: -0.33
    * Sim Trans: -6.1
    * Operating Mode -- TE


History


23 Feb 2004 - Initial Version
27 Dec 2004 - Updated for Cycle 7
15 Dec 2005 - Updated for Cycle 8



Return to Threads Page
Hardcopy (PDF): A4 | Letter
Last modified: 15 December 2005


The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory.
60 Garden Street, Cambridge, MA 02138 USA.    Email: cxcweb@head.cfa.harvard.edu
Smithsonian Institution, Copyright © 1998-2004. All rights reserved.