TukeyWindow

class photutils.TukeyWindow(alpha)[source]

Bases: photutils.psf.matching.SplitCosineBellWindow

Class to define a 2D Tukey window function.

The Tukey window is a taper formed by using a split cosine bell function with ends that touch zero.

Parameters:
alpha : float, optional

The percentage of array values that are tapered.

Examples

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

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

../_images/photutils-TukeyWindow-1.png

A 1D cut across the image center:

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

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

../_images/photutils-TukeyWindow-2.png