In [10]:
import astropy.io.fits as pyfits
import astropy.visualization as viz
import matplotlib.pyplot as plt
import numpy as np
%matplotlib inline
plt.rcParams['figure.figsize'] = (10.0, 10.0)
In [2]:
imfits = pyfits.open('a1835_xmm/P0098010101M2U009IMAGE_3000.FTZ')
im = imfits[0].data
bkfits = pyfits.open('a1835_xmm/P0098010101M2X000BKGMAP3000.FTZ')
bk = bkfits[0].data
exfits = pyfits.open('a1835_xmm/P0098010101M2U009EXPMAP3000.FTZ')
ex = exfits[0].data
In [3]:
plt.imshow(viz.scale_image(im, scale='log', max_cut=40), cmap='gray', origin='lower');
ex
is the exposure map (units of seconds). This is actually the product of the exposure time used to make the image, and a relative sensitivity map accounting for the vignetting of the telescope, dithering, and bad pixels whose data have been excised. Displaying the exposure map on a linear scale makes the vignetting pattern and other features clear.
In [4]:
plt.imshow(ex, cmap='gray', origin='lower');
bk
is a particle background map. This is not data at all, but a model for the expected counts/pixel in this specific observation due to the quiescent particle background. The map comes out of a blackbox in the processing pipeline -- even though there are surely uncertainties in it, we have no quantitative description of them to work with. Note that the exposure map above does not apply to the particle backround; some particles are vignetted by the telescope optics, but not to the same degree as X-rays. The resulting spatial pattern and the total exposure time are accounted for in bk
.
In [5]:
plt.imshow(bk, cmap='gray', origin='lower');
ex
to zero.
In [6]:
mask = np.loadtxt('a1835_xmm/M2ptsrc.txt')
for reg in mask:
# this is inefficient but effective
for i in np.round(reg[1]+np.arange(-np.ceil(reg[2]),np.ceil(reg[2]))):
for j in np.round(reg[0]+np.arange(-np.ceil(reg[2]),np.ceil(reg[2]))):
if (i-reg[1])**2 + (j-reg[0])**2 <= reg[2]**2:
ex[np.int(i-1), np.int(j-1)] = 0.0
In [8]:
plt.imshow(ex, cmap='gray', origin='lower');
$S(r) = S_0 \left[1.0 + \left(\frac{r}{r_c}\right)^2\right]^{-3\beta + 1/2}$,
In [1]:
#todo
CL*ex
, where CL
is an image with pixel values according to $S(r)$.b*ex
, where b
is a single number with units of counts/s/pixel.PB
.(CL+b)*ex + PB
predicts an expected number of counts/pixel across the field. What does this mean? Blah blah Poisson distribution, etc.
In [ ]: