Contents:
r = radial_data(data,annulus_width,working_mask,x,y)
A function to reduce an image to a radial cross-section.
INPUT: |
annulus_width - width of each annulus. Default is 1.
rmax – maximum radial value over which to compute statistics |
---|---|
OUTPUT: |
|
EXAMPLE: | import numpy as np
import pylab as py
import radial_data as rad
# Create coordinate grid
npix = 50.
x = np.arange(npix) - npix/2.
xx, yy = np.meshgrid(x, x)
r = np.sqrt(xx**2 + yy**2)
fake_psf = np.exp(-(r/5.)**2)
noise = 0.1 * np.random.normal(0, 1, r.size).reshape(r.shape)
simulation = fake_psf + noise
rad_stats = rad.radial_data(simulation, x=xx, y=yy)
py.figure()
py.plot(rad_stats.r, rad_stats.mean / rad_stats.std)
py.xlabel('Radial coordinate')
py.ylabel('Signal to Noise')
|