Skip to content
Permalink
Browse files

MCMC Additions

  • Loading branch information...
fprimini committed May 23, 2018
1 parent cfb3379 commit ad2f826b1c183dc2ad4da1827196720c5194a613
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.
Binary file not shown.
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,74 @@
imoose-209: ./xap_mcmc_only.py @@xap_mcmc_only.par
Getting Events from acisf01575_001N001_evt3.fits.gz[energy=500:7000]

Exposure: 37664.157219
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]]


Running MCMC...
Dataset = 1
Method = moncar
Statistic = cash
Initial fit statistic = -56578.1
Final fit statistic = -56589.2 at function evaluation 921
Data points = 5
Degrees of freedom = 0
Change in statistic = 11.0337
xap.Source_0 0.000250474
xap.Source_1 8.66764e-05
xap.Source_2 7.02416e-06
xap.Source_3 1.73581e-05
xap.Background 8.04861e-10
Dataset = 1
Confidence Method = covariance
Iterative Fit Method = None
Fitting Method = moncar
Statistic = cash
covariance 1-sigma (68.2689%) bounds:
Param Best-Fit Lower Bound Upper Bound
----- -------- ----------- -----------
xap.Source_0 0.000250474 -5.16864e-06 5.16864e-06
xap.Source_1 8.66764e-05 -3.26866e-06 3.26866e-06
xap.Source_2 7.02416e-06 -1.02701e-06 1.02701e-06
xap.Source_3 1.73581e-05 -1.81424e-06 1.81424e-06
xap.Background 8.04861e-10 -2.57661e-11 2.57661e-11
Using Priors:
xap.Source_0: <function flat at 0x106adb6e0>
xap.Source_1: <function flat at 0x106adb6e0>
xap.Source_2: <function flat at 0x106adb6e0>
xap.Source_3: <function flat at 0x106adb6e0>
xap.Background: <function flat at 0x106adb6e0>
imoose-210:
@@ -0,0 +1,44 @@
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.

This version of the code uses the CIAO Sherpa and pyBLoCXS environments to sample
the posterior probability distribution.

The code is designed to run within the CIAO data analysis environment
(http://cxc.cfa.harvard.edu/ciao), but has not yet been tested with CIAO v. 4.10
or Python 3.


xap_mcmc_only.py Main Python program
xap_funs.py Function and Class definitions for xap.py
xap_mcmc_funs.py Additional MCMC functions and class definitions
xap_mcmc_only.par CIAO style parameter file for xap.py


XAP/MCMC_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
mcmc_r0115_r0116_r0123_r0150_mpdfs.fits fits file containing marginalized posterior probability
distributions for all sources and background, in
separate fits extensions. Two separate smoothing
functions are used for each mpdf.
mcmc_r0115_r0116_r0123_r0150_draws.fits fits file containing mcmc draws used to sample mpdfs.
xap_mcmc_only.log log of test run

0 comments on commit ad2f826

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