HanningWindow

class photutils.psf.HanningWindow[source]

Bases: photutils.psf.matching.SplitCosineBellWindow

Class to define a 2D Hanning (or Hann) window function.

The Hann window is a taper formed by using a raised cosine with ends that touch zero.

Examples

import matplotlib.pyplot as plt
from photutils.psf import HanningWindow
taper = HanningWindow()
data = taper((101, 101))
plt.imshow(data, cmap='viridis', origin='lower')
plt.colorbar()

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

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

A 1D cut across the image center:

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

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

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