TopHatWindow

class photutils.psf.TopHatWindow(beta)[source]

Bases: photutils.psf.matching.SplitCosineBellWindow

Class to define a 2D top hat window function.

Parameters
betafloat, optional

The inner diameter as a fraction of the array size beyond which the taper begins. beta must be less or equal to 1.0.

Examples

import matplotlib.pyplot as plt
from photutils.psf import TopHatWindow
taper = TopHatWindow(beta=0.4)
data = taper((101, 101))
plt.imshow(data, cmap='viridis', origin='lower',
           interpolation='nearest')
plt.colorbar()

(Source code, png, hires.png, pdf, svg)

../_images/photutils-psf-TopHatWindow-1.png

A 1D cut across the image center:

import matplotlib.pyplot as plt
from photutils.psf import TopHatWindow
taper = TopHatWindow(beta=0.4)
data = taper((101, 101))
plt.plot(data[50, :])

(Source code, png, hires.png, pdf, svg)

../_images/photutils-psf-TopHatWindow-2.png