opticam.finders

Classes

DefaultFinder

Default source finder. Combines image segmentation with source deblending.

Functions

get_source_coords_from_image(image, finder, threshold)

Get an array of source coordinates from an image in descending order of source brightness.

Module Contents

class opticam.finders.DefaultFinder(npixels, border_width=0)

Default source finder. Combines image segmentation with source deblending.

Parameters:
  • npixels (int)

  • border_width (int)

border_width = 0
finder
__call__(data, threshold)
Parameters:
  • data (numpy.typing.NDArray)

  • threshold (float | numpy.typing.NDArray)

Return type:

astropy.table.QTable

opticam.finders.get_source_coords_from_image(image, finder, threshold, bkg=None, n_sources=None, background=None, return_fwhm=False, aperture_selector=None)

Get an array of source coordinates from an image in descending order of source brightness.

Parameters

imageNDArray

The non-background-subtracted image from which to extract source coordinates.

finderDefaultFinder

The source finder.

thresholdfloat | int

The source detection threshold in units of background RMS.

bkgBackground2D, optional

The background of the image, by default None. If None, the background is estimated from the image.

n_sourcesint, optional

The number of source coordinates to return, by default None (all sources will be returned).

background: BaseBackground | None, optional

The background estimator if bkg = None, by default None. Either bkg or background must be defined.

return_fwhmbool, optional

Whether to return the average PSF FWHM of the image, by default False.

aperture_selectorCallable[[NDArray[np.float64]], float] | None, optional

The function to use to compute the average PSF FWHM, by default None. If a function is passed, it must take an array of floats and return a float (e.g., np.median).

Returns

NDArray

The source coordinates in descending order of brightness.

Parameters:
  • image (numpy.typing.NDArray)

  • finder (DefaultFinder)

  • threshold (float | int)

  • bkg (photutils.background.Background2D | None)

  • n_sources (int | None)

  • background (opticam.background.global_background.BaseBackground | None)

  • return_fwhm (bool)

  • aperture_selector (Callable[[numpy.typing.NDArray[numpy.float64]], float] | None)

Return type:

numpy.typing.NDArray | tuple[numpy.typing.NDArray, float]