Skip to content
Permalink
Browse files

Initial Version

 On branch master
 Initial commit
	new file:   .gitignore
	new file:   Example/acisf01575_001N001_evt3.fits.gz
	new file:   Example/acisf01575_001N001_r0115_srcreg3.fits
	new file:   Example/acisf01575_001N001_r0115b_psf3.fits.gz
	new file:   Example/acisf01575_001N001_r0115b_regexp3.fits.gz
	new file:   Example/acisf01575_001N001_r0116_srcreg3.fits
	new file:   Example/acisf01575_001N001_r0116b_psf3.fits.gz
	new file:   Example/acisf01575_001N001_r0116b_regexp3.fits.gz
	new file:   Example/acisf01575_001N001_r0123_srcreg3.fits
	new file:   Example/acisf01575_001N001_r0123b_psf3.fits.gz
	new file:   Example/acisf01575_001N001_r0123b_regexp3.fits.gz
	new file:   Example/acisf01575_001N001_r0150_srcreg3.fits
	new file:   Example/acisf01575_001N001_r0150b_psf3.fits.gz
	new file:   Example/acisf01575_001N001_r0150b_regexp3.fits.gz
	new file:   Example/full_dataset_uninformative_priors_27_Mar_2018.log
	new file:   Example/mpdf_r0115_r0116_r0123_r0150_uninformative.fits
	new file:   Example/new_acisf01575_001N001_r0116_bkgreg3.fits
	new file:   Example/r0115_r0116_r0123_r0150_psfs.lis
	new file:   Example/r0115_r0116_r0123_r0150_regexps.lis
	new file:   Example/r0115_r0116_r0123_r0150_srcs.lis
	new file:   README
	new file:   xap.par
	new file:   xap.py
	new file:   xap_funs.py
  • Loading branch information...
fprimini committed Mar 27, 2018
0 parents commit 8cd946f3c8eedf59c9ca2b216c7968f091933865
@@ -0,0 +1,2 @@
*.pyc
*~
Binary file not shown.

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
@@ -0,0 +1,85 @@
imoose-64: ../xap.py @@../xap.par
Input event list or image (acisf01575_001N001_evt3.fits.gz[energy=500:7000]): acisf01575_001N001_evt3.fits.gz[energy=500:7000]
Output binary fits table of pdfs, one extension per source (mpdf_r0115_r0116_r0123_r0150_uninformative.fits): mpdf_r0115_r0116_r0123_r0150_uninformative.fits
Background Regions (new_acisf01575_001N001_r0116_bkgreg3.fits): new_acisf01575_001N001_r0116_bkgreg3.fits
Source Regions (r0115_r0116_r0123_r0150_srcs.lis): r0115_r0116_r0123_r0150_srcs.lis
PSF Files (r0115_r0116_r0123_r0150_psfs.lis): r0115_r0116_r0123_r0150_psfs.lis
EXP Files (r0115_r0116_r0123_r0150_regexps.lis): r0115_r0116_r0123_r0150_regexps.lis
Source Intensities and Variances for Gamma-Priors (none): none
Getting Events from acisf01575_001N001_evt3.fits.gz[energy=500:7000]

Exposure: 37664.157219
Output results to mpdf_r0115_r0116_r0123_r0150_uninformative.fits

Source Regions:
acisf01575_001N001_r0115_srcreg3.fits
acisf01575_001N001_r0116_srcreg3.fits
acisf01575_001N001_r0123_srcreg3.fits
acisf01575_001N001_r0150_srcreg3.fits

Background Regions:
new_acisf01575_001N001_r0116_bkgreg3.fits

PSF Images:
acisf01575_001N001_r0115b_psf3.fits.gz
acisf01575_001N001_r0116b_psf3.fits.gz
acisf01575_001N001_r0123b_psf3.fits.gz
acisf01575_001N001_r0150b_psf3.fits.gz


Counts in Region 0: 2395.000000
Counts in Region 1: 759.000000
Counts in Region 2: 90.000000
Counts in Region 3: 273.000000

Counts in Background Region: 1043.000000

F:
[[ 9.47097792e+06 0.00000000e+00 1.88825435e+03 5.61431210e+03
2.81542818e+10]
[ 0.00000000e+00 8.43717107e+06 7.49609455e+03 1.30013338e+04
3.40651940e+10]
[ 0.00000000e+00 3.77625891e+03 9.27489281e+06 9.38946854e+03
3.02678311e+10]
[ 1.79756938e+03 9.35427532e+05 5.58759992e+03 9.27772159e+06
3.77550753e+10]
[ 6.86684574e+04 1.26875147e+05 2.78983391e+05 1.24331647e+05
1.25572609e+12]]


Intensity Grid Attributes:
Grid Half-size number of MLE sigma: 5.000000
Minimum allowable grid value: 1.000000e-10
Number of grid points (per dimension): 30

Source 0: Mesh Length: 30
Source 1: Mesh Length: 30
Source 2: Mesh Length: 30
Source 3: Mesh Length: 30
Source 4: Mesh Length: 30

Building Priors.....
Using Non-informative Priors.....
Intensity Lower Bound Upper Bound
--------- ----------- -----------
MLE Estimate for Source 0 = 2.504735e-04 2.453049e-04 2.556421e-04
Bayes Estimate for Source 0 = 2.504663e-04 2.453738e-04 2.557455e-04
MLE Estimate for Source 1 = 8.667643e-05 8.340777e-05 8.994510e-05
Bayes Estimate for Source 1 = 8.666781e-05 8.345135e-05 9.001047e-05
MLE Estimate for Source 2 = 7.024156e-06 5.997127e-06 8.051185e-06
Bayes Estimate for Source 2 = 7.016438e-06 6.038933e-06 8.099839e-06
MLE Estimate for Source 3 = 1.735807e-05 1.554383e-05 1.917232e-05
Bayes Estimate for Source 3 = 1.734288e-05 1.557834e-05 1.921893e-05
MLE Estimate for Background = 8.048614e-10 7.790953e-10 8.306276e-10
Bayes Estimate for Background = 8.047743e-10 7.794389e-10 8.311429e-10

Estimates of Means and Variances of Individual Sources

s_mean Var(s)
------ ------
2.5058e-04 2.6725e-11
8.6792e-05 1.0698e-11
7.1293e-06 1.0660e-12
1.7451e-05 3.3029e-12
8.0561e-10 6.6450e-22
imoose-65:
Binary file not shown.
@@ -0,0 +1 @@
SIMPLE = T / file does conform to FITS standard BITPIX = 16 / number of bits per data pixel NAXIS = 0 / number of data axes EXTEND = T / FITS dataset may contain extensions COMMENT FITS (Flexible Image Transport System) format is defined in 'AstronomyCOMMENT and Astrophysics', volume 376, page 359; bibcode: 2001A&A...376..359H HDUNAME = 'PRIMARY ' END XTENSION= 'BINTABLE' / binary table extension BITPIX = 8 / 8-bit bytes NAXIS = 2 / 2-dimensional binary table NAXIS1 = 66 / width of table in bytes NAXIS2 = 5 / number of rows in table PCOUNT = 0 / size of special data area GCOUNT = 1 / one data group (required keyword) TFIELDS = 6 / number of fields in each row EXTNAME = 'REGION ' / name of this binary table extension HDUNAME = 'REGION ' / ASCDM block name TTYPE1 = 'X ' / Position TFORM1 = '1D ' / format of field TUNIT1 = 'pixel ' TTYPE2 = 'Y ' / Position TFORM2 = '1D ' / format of field TUNIT2 = 'pixel ' TTYPE3 = 'SHAPE ' / Region shape type TFORM3 = '16A ' / format of field TUNIT3 = ' ' TTYPE4 = 'R ' / Radius TFORM4 = '2D ' / format of field TUNIT4 = 'pixel ' TTYPE5 = 'ROTANG ' / Angle TFORM5 = '2D ' / format of field TUNIT5 = 'pixel ' TTYPE6 = 'COMPONENT' / Component number TFORM6 = '1I ' / format of field LONGSTRN= 'OGIP 1.0' / The HEASARC Long String Convention may be used.COMMENT This FITS file may contain long string keyword values that are COMMENT continued over multiple keywords. The HEASARC convention uses the & COMMENT character at the end of each substring which is then continued COMMENT on the next keyword which has the name CONTINUE. HDUCLASS= 'ASC ' / Region extension HDUCLAS1= 'REGION ' / Region extension HDUCLAS2= 'STANDARD' / Region extension CONTENT = 'REGION ' / CXC Content key HISTNUM = 15 HISTORY TOOL :dmmakereg 2012-01-13T14:18:34 ASC00001HISTORY PARM :region=ellipse(3753.1160188457,5219.7921083628,228.16672ASC00002HISTORY CONT :706608,201.67569541933,79.8440475464)-ellipse(3910.86071ASC00003HISTORY CONT :88703,5148.0211810013,33.6904640198,27.5195903778,81.254ASC00004HISTORY CONT :8065186)-ellipse(3753.1160188457,5219.7921083628,41.4848ASC00005HISTORY CONT :594666,36.6683082581,79.8440475464)-ellipse(3836.6864406ASC00006HISTORY CONT :780,5294.0084745763,39.1527938843,25.3704013824,95.23891ASC00007HISTORY CONT :44897)-ellipse(3793.1666666667,5206.2424242424,38.287052ASC00008HISTORY CONT :1545,32.9218597412,89.4324645996) ASC00009HISTORY PARM :outfile=new_acisf01575_001N001_r0116_bkgreg3.fits ASC00010HISTORY PARM :append=no ASC00011HISTORY PARM :kernel=fits ASC00012HISTORY PARM :wcsfile=acisf01575_001N001_evt3.fits.gz ASC00013HISTORY PARM :verbose=0 ASC00014HISTORY PARM :clobber=no ASC00015MTYPE1 = 'POS ' / DM Keyword: Descriptor name. MFORM1 = 'X,Y ' / [pixel] END @�R;f�x@�c�ǝEllipse @l�U�~@i5�L�@S���@����$��@�l;�!Ellipse @@�a �@;����@TPN� u@�R;f�x@�c�ǝ!Ellipse @D���@BU� �@S���@��_u'O@��+c�!Ellipse @C��� u@9^ҟ��@W�J_��T@��UUUU�@�V>���!Ellipse @C$���t@@u����@V[���l
@@ -0,0 +1,4 @@
acisf01575_001N001_r0115b_psf3.fits.gz
acisf01575_001N001_r0116b_psf3.fits.gz
acisf01575_001N001_r0123b_psf3.fits.gz
acisf01575_001N001_r0150b_psf3.fits.gz
@@ -0,0 +1,5 @@
acisf01575_001N001_r0115b_regexp3.fits.gz
acisf01575_001N001_r0116b_regexp3.fits.gz
acisf01575_001N001_r0123b_regexp3.fits.gz
acisf01575_001N001_r0150b_regexp3.fits.gz
acisf01575_001N001_r0116b_regexp3.fits.gz
@@ -0,0 +1,4 @@
acisf01575_001N001_r0115_srcreg3.fits
acisf01575_001N001_r0116_srcreg3.fits
acisf01575_001N001_r0123_srcreg3.fits
acisf01575_001N001_r0150_srcreg3.fits
37 README
@@ -0,0 +1,37 @@
This package contains python code for computing aperture photometry for
unresolved sources in astronomical x-ray images, as described in the article
"DETERMINING X-RAY SOURCE INTENSITY AND CONFIDENCE BOUNDS IN CROWDED FIELDS",
Primini, F.A and Kashyap, V.L. 2014, The Astrophysical Journal, v. 796, pp. 24-37.

The code is designed to run within the CIAO data analysis environment
(http://cxc.cfa.harvard.edu/ciao).


xap.py Main Python program
xap_funs.py Function and Class definitions for xap.py
xap.par CIAO style parameter file for xap.py


XAP/Example: Test data for Figure 1 in Primini & Kashyap, 2014
acisf01575_001N001_evt3.fits.gz Test Chandra Level 3 Event List
acisf01575_001N001_r0115b_psf3.fits.gz Level 3 PSF image for source r0115
acisf01575_001N001_r0115b_regexp3.fits.gz Level 3 expmap for r0115
acisf01575_001N001_r0115_srcreg3.fits Level 3 source region for r0115
acisf01575_001N001_r0116b_psf3.fits.gz PSF image for r0116
acisf01575_001N001_r0116b_regexp3.fits.gz expmap for r0116
acisf01575_001N001_r0116_srcreg3.fits source region for r0116
acisf01575_001N001_r0123b_psf3.fits.gz PSF image for r0123
acisf01575_001N001_r0123b_regexp3.fits.gz expmap for r0123
acisf01575_001N001_r0123_srcreg3.fits source region for r0123
acisf01575_001N001_r0150b_psf3.fits.gz PSF image for r0150
acisf01575_001N001_r0150b_regexp3.fits.gz expmap for r0150
acisf01575_001N001_r0150_srcreg3.fits source region for r0150
new_acisf01575_001N001_r0116_bkgreg3.fits background region for all sources
r0115_r0116_r0123_r0150_psfs.lis stack of psf filenames
r0115_r0116_r0123_r0150_regexps.lis stack of expmap filenames
r0115_r0116_r0123_r0150_srcs.lis stack of source region filenames
mpdf_r0115_r0116_r0123_r0150_uninformative.fits fits file containing marginalized posterior probability
distributions for all sources and background, in
separate fits extensions
full_dataset_uninformative_priors_27_Mar_2018.log log of test run

12 xap.par
@@ -0,0 +1,12 @@
infile,f,a,"acisf01575_001N001_evt3.fits.gz[energy=500:7000]",,,"Input event list or image"
outfile,f,a,"mpdf_r0115_r0116_r0123_r0150_uninformative.fits",,,"Output binary fits table of pdfs, one extension per source"
srcstack,f,a,"r0115_r0116_r0123_r0150_srcs.lis",,,"Source Regions"
breg,f,a,"new_acisf01575_001N001_r0116_bkgreg3.fits",,,"Background Regions"
psfstack,f,a,"r0115_r0116_r0123_r0150_psfs.lis",,,"PSF Files"
expstack,f,a,"r0115_r0116_r0123_r0150_regexps.lis",,,"EXP Files"
CL,r,h,0.68269,,,"Desired Confidence Level"
intenstack,f,a,"none",,,"Source Intensities and Variances for Gamma-Priors"
nmesh,i,h,30,,,"Number of mesh points per source"
verbose,i,h,1,0,5,"Debug Level(0-5)"
clobber,b,h,yes,,,"Overwrite existing outputs?"
mode,s,h,"ql",,,

0 comments on commit 8cd946f

Please sign in to comment.
You can’t perform that action at this time.