Computing the Intensity Upper Limit for an Unresolved Source
CIAO 4.15 Science Threads
The tool aprates, computes values and bounds for source intensity quantities (net counts, source rate, photon flux, energy flux) using counts and exposure data obtained in source and background apertures, as shown in the Compute Net Counts, Rate, or Flux for Point Sources thread.
The steps in this thread have been automated in the srcflux script. This thread shows how to get upper limits this way.
The thread then uses aprates to determine how x-ray bright a source could be at the given location in the observation. The intensity upper limit is calculated in flux units in this thread.
aprates uses Bayesian statistics to compute the background-marginalized, posterior probability distribution for source intensity, assuming non-informative prior distributions for background and source intensity (for details on the algorithm, see the Background Marginalized X-ray Source Intensity memo). The posterior distribution can be used to determine intensity value and confidence bounds or intensity upper limit.
To calculate the intensity upper limit for a source within a specified aperture.
Last Update: 15 Feb 2022 - Review for CIAO 4.14. Updated for Repro-5/CALDB 4.9.6.
- Get Started
- Run srcflux
- Step By Step
- Parameter files:
Download the sample data: 315 (ACIS-S, NGC 4038/39)
unix% download_chandra_obsid 315
The data used in this thread was taken very early in the Chandra mission. It was not included in the bulk reprocessing metioned in the Watchout page. The keywords required for analysis with CIAO need to be added by running chandra_repro or r4_header_update.
Figure 1 shows the x-ray data (left) and an optical image from the Digital Sky Survey (right). The optical image was retrieved from SAO-DSS via the ds9 "Analysis → Image Servers" menu. The star circled in white - 2MASS J12014790-1851156 - is clearly visible in the optical but not in x-ray.
Figure 1: Apertures overlaid on x-ray and optical data
The location (ra,dec)=(12:01:47.9, -18:51:15.6) will be used as the center of the apertures in this thread.
With srcflux we can get the upper limit on in the Chandra broad-band (0.5 to 7.0 keV) by simply
unix% punlearn srcflux unix% pset srcflux infile=acisf00315_repro_evt2.fits unix% pset srcflux outroot=dss unix% pset srcflux pos="12:01:47.9 -18:51:15.6" unix% pset srcflux psfmethod=quick unix% srcflux ... Summary of source fluxes Position 0.5 - 7.0 keV Value 90% Conf Interval #0001|12 1 47.89 -18 51 15.6 Rate 1.3E-06 c/s (0,5.28E-05) Flux NAN erg/cm2/s (NAN,NAN) Mod.Flux 6.48E-18 erg/cm2/s (0,2.63E-16) Unabs Mod.Flux 6.92E-18 erg/cm2/s (0,2.81E-16)
srcflux automatically creates source and background regions and extracts all the quantities discussed in the Step by Step section (below). The output shows that the 90% upper limit at the source location in the 0.5 to 7.0 keV range is roughly 5.31E-5 counts per second.
The tool outputs several files including the dss_broad.flux file that contains a summary of all the counts, rates, areas, and flux values.
unix% dmlist "dss_broad.flux[cols counts,bg_counts,area,bg_area,net_rate_aper_hi]" data,clean # COUNTS BG_COUNTS AREA BG_AREA NET_RATE_APER_HI 1.0 23.0 20.750 518.50 5.28062E-05
The next section shows how to run the steps necessary to run the aprates tool.
Step By Step
Selecting the Apertures
A circle with radius 5" is used as the source region and an annulus with inner radius of 5" and outer radius of 10" is used for the background:
These are not the same as the apertures used above so the results are expected to be slightly different.
Counts in source and background apertures
The number of counts in the source (n) and background (m) apertures is found by running dmlist on the event file with the source and background regions. The energy range of the events is restricted to 0.5-7.0 keV:
unix% dmlist 'acisf00315_repro_evt2.fits[energy=500:7000][(ra,dec)=circle(12:01:47.9,-18:51:15.6,5")]' counts 15 unix% dmlist 'acisf00315_repro_evt2.fits[energy=500:7000][(ra,dec)=annulus(12:01:47.9,-18:51:15.6,5",15")]' counts 132
There are 14 source counts (n=14) and 130 background counts (m=130).
Areas of source and background apertures
The area of the source (A_s) and background (A_b) apertures is computed:
Source: 5^2 * pi = 78.5 Background: (15^2 - 5^2) * pi = 628.3
The source area is 78.5 square arcsec (A_s=78.5) and the background area is 628.3 square arcsec (A_b=628.3).
Exposure time of the observation
By setting the exposure times in the source (T_s) and background (T_b) apertures, the net source rate and errors will be computed.
For this example, the exposure time is the same for the source and background since they come from the same file:
unix% dmkeypar acisf00315_repro_evt2.fits LIVETIME echo+ 72242.2
The exposure time is 72242.2 s.
Run aprates to find the limit
For this calculation, it is assumed that 99% of the PSF is contained within the source region (alpha=.99) and 1% is in the background region (beta=.01). The following parameters are all set to "1" as we are not calculating flux: E_s, eng_s, flux_s, E_b, eng_b, and flux_b.
The aprates parameters are set with the values determined above and the tool is run. For details on how the tool does the calculations, refer to the aprates help file.
unix% punlearn aprates unix% pset aprates n=15 m=130 unix% pset aprates A_s=78.5 A_b=628.3 unix% pset aprates alpha=0.99 beta=0.01 unix% pset aprates T_s=72242.2 T_b=72242.2 unix% pset aprates E_s=1 eng_s=1 flux_s=1 E_b=1 eng_b=1 flux_b=1 unix% pset aprates outfile=ulimit.par unix% aprates mode=h
You may see a warning:
# aprates (CIAO 4.4): WARNING: Large number of counts, just using Gaussian pdf
It indicates that Gaussian statistics were used instead of Poisson statistics; the threshold is controlled by the max_counts parameter.
The output file is in parameter file format, which makes it possible to query the output values with the tool pget:
unix% pget ulimit.par src_rate src_rate_err_lo src_rate_err_up 0 INDEF 5.775e-05
At the 68% confidence level, the upper limit on the x-ray count rate is 5.775e-05 counts/s.
The full output file, ulimit.par, is included at the end of the thread.
Parameters for /home/username/cxcds_param/ulimit.par src_cnts,r,h,0.0,,, src_cnts_err_lo,r,h,INDEF,,, src_cnts_err_up,r,h,4.17198,,, src_cnts_conf,r,h,0.684242,,, src_cnts_status,i,h,0,,, src_cnts_signif,r,h,0,,, src_cnts_mode,r,h,0,,, src_rate,r,h,0.0,,, src_rate_err_lo,r,h,INDEF,,, src_rate_err_up,r,h,5.775e-05,,, src_rate_conf,r,h,0.684242,,, src_rate_status,i,h,0,,, src_rate_signif,r,h,0,,, src_rate_mode,r,h,0,,, photflux_aper,r,h,0.0,,, photflux_aper_err_lo,r,h,0,,, photflux_aper_err_up,r,h,0,,, photflux_aper_conf,r,h,0,,, photflux_aper_status,i,h,4,,, photflux_aper_signif,r,h,0,,, photflux_aper_mode,r,h,0,,, flux_aper,r,h,0.0,,, flux_aper_err_lo,r,h,0,,, flux_aper_err_up,r,h,0,,, flux_aper_conf,r,h,0,,, flux_aper_status,i,h,4,,, flux_aper_signif,r,h,0,,, flux_aper_mode,r,h,0,,, eflux_aper,r,h,0.0,,, eflux_aper_err_lo,r,h,0,,, eflux_aper_err_up,r,h,0,,, eflux_aper_conf,r,h,0,,, eflux_aper_status,i,h,4,,, eflux_aper_signif,r,h,0,,, eflux_aper_mode,r,h,0,,, # ---- Inputs below ---- _n,i,h,15,,, _A_s,r,h,78.5398,,, _alpha,r,h,1,,, _T_s,r,h,72242.2,,, _E_s,r,h,0,,, _eng_s,r,h,0,,, _flux_s,r,h,0,,, _m,i,h,132,,, _A_b,r,h,628.318,,, _beta,r,h,0,,, _T_b,r,h,72242.2,,, _E_b,r,h,0,,, _eng_b,r,h,0,,, _flux_b,r,h,0,,,
|24 Jul 2009||New for CIAO 4.1: title updated to "Computing the Intensity Upper Limit for an Unresolved Source"|
|27 Jan 2010||updated for CIAO 4.2: use N004 version of data products from the Archive; screen output updated|
|15 Dec 2010||updated for CIAO 4.3: minor changes to screen output|
|10 Jan 2012||reviewed for CIAO 4.4: no changes|
|03 Dec 2012||Review for CIAO 4.5; no changes|
|11 Dec 2013||Review for CIAO 4.6; made step-by-step section and introduced a new section showing how to do in 1 command with srcflux|
|23 Dec 2014||Review for CIAO 4.7; minor edits only.|
|15 Feb 2022||Review for CIAO 4.14. Updated for Repro-5/CALDB 4.9.6.|