SplitCosineBellWindow

class photutils.psf.matching.SplitCosineBellWindow(alpha, beta)[source]

Bases: object

Class to define a 2D split cosine bell taper function.

Parameters
alphafloat, optional

The percentage of array values that are tapered.

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 SplitCosineBellWindow
taper = SplitCosineBellWindow(alpha=0.4, beta=0.3)
data = taper((101, 101))
plt.imshow(data, cmap='viridis', origin='lower')
plt.colorbar()

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

../_images/photutils-psf-matching-SplitCosineBellWindow-1.png

A 1D cut across the image center:

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

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

../_images/photutils-psf-matching-SplitCosineBellWindow-2.png

Methods Summary

__call__(shape)

Return a 2D split cosine bell.

Methods Documentation

__call__(shape)[source]

Return a 2D split cosine bell.

Parameters
shapetuple of int

The size of the output array along each axis.

Returns
resultndarray

A 2D array containing the cosine bell values.