astrowisp.psf_base module

Class Inheritance Diagram

Inheritance diagram of ABC, PSFBase

Defines a base class for all PSF models: PSFBase.

class astrowisp.psf_base.PSFBase[source]

Bases: ABC

Inheritance diagram of astrowisp.psf_base.PSFBase

The base class for all supported PSFs.

abstract __call__(x, y)[source]

Return the value of the PSF at the given point.

Parameters:
  • x – The horizontal offset from center of the point at which to return the PSF value.

  • y – The vertical offset from center of the point at which to return the PSF value.

Returns:

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

abstract get_down_range()[source]

Return how far the PSF extends downward of center.

abstract get_left_range()[source]

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

abstract get_right_range()[source]

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

abstract get_up_range()[source]

Return how far the PSF extends upward of center.

abstract 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

predict_pixel(center_x, center_y, subpix_map=array([[1.]]))[source]

Predict the value(s) of pixel(s) assuming a pixel sensitivity map.

Parameters:
  • center_x (float or array) – The offset(s) of the center(s) of the pixels from the source position in the x direction.

  • center_y (float or array) – The offset(s) of the center(s) of the pixels from the source position in the y direction.

  • subpix_map (2-D array) – The pixel sensitivity map to assume.

Returns:

The integral(s) of product of the PSF and the sub-pixel sensitivity map over pixel(s) located as specified relative to the source center.

Return type:

float or array