astrowisp.piecewise_bicubic_psf module

Class Inheritance Diagram

Inheritance diagram of PSFBase, PiecewiseBicubicPSF, c_double

A wrapper class for working with PSFs/PRFs from the C/C++ library.

class astrowisp.piecewise_bicubic_psf.PiecewiseBicubicPSF(library_psf)[source]

Bases: PSFBase

Inheritance diagram of astrowisp.piecewise_bicubic_psf.PiecewiseBicubicPSF

Implement the PSFBase methods for libary PSFs.

__call__(x, y)[source]

Return the value(s) of the PSF at the given point(s).

Parameters:
  • x (float or numpy array) – The horizontal offset(s) from center of the point at which to return the PSF value.

  • y (float or numpy array) – The vertical offset(s) from center of the point at which to return the PSF value.

Returns:

The value(s) of the PSF at (x, y) relative to the source center.

Return type:

numpy array

__del__()[source]

Delete the underlying library PSF.

__init__(library_psf)[source]

Wrap the given library PSF in a convenient python interface.

get_down_range()[source]

Return how far the PSF extends downward of center.

get_left_range()[source]

Return how far the PSF extends to the left of center.

get_right_range()[source]

Return how far the PSF extends to the right of center.

get_up_range()[source]

Return how far the PSF extends upward of center.

integrate(*, center_x, center_y, width, height, circle_radius=None)[source]

Return integrals of the PSF over circle-rectangle overlaps.

Parameters:
  • center_x (float or array) – The x coordinate(s) of the center(s) of the rectangle(s) to integrate over.

  • center_y (float or array) – The y coordinate(s) of the center(s) of the rectangle(s) to integrate over.

  • width (float or array) – The width(s) of the rectangle(s).

  • height (float or array) – The height(s) of the rectangle(s).

  • circle_radius (float or array) – The rad(ii/us) of the circle(s). For zero entries or None, the integral is over the full rectangle(s).

Returns:

The integral of the PSF over the specified area(s).

Return type:

float or array