Apertures

pawlikMorphLSST.apertures.makeaperpixmaps(npix: int, folderpath=None) → None

Writes the aperture binary masks out after calculation.

Parameters
  • npix (int) – Width of aperture image.

  • folderpath (Pathlib object) – Path to the folder where the aperture masks should be saved.

Returns

Return type

None

pawlikMorphLSST.apertures.distarr(npixx: int, npixy: int, cenpix: numpy.ndarray) → numpy.ndarray

Creates an array of distances from given centre pixel.

Near direct translation of IDL code.

Parameters
  • npixx (int) – Number of x pixels in the aperture mask.

  • npixy (int) – Number of y pixels in the aperture mask.

  • cenpix (np.ndarray) – Location of central pixels.

Returns

array of distances.

Return type

np.ndarray

pawlikMorphLSST.apertures.subdistarr(npix: int, nsubpix: int, cenpix: List[int]) → numpy.ndarray

Writes the aperture binary masks out after calculation.

Near direct translation of IDL code.

Parameters
  • npix (int) – Number of pixels in the aperture mask.

  • nsubpix (int) – Number of subpixels.

  • cenpix (List[int]) – Location of central pixels.

Returns

Array of sub-distances.

Return type

np.ndarray

pawlikMorphLSST.apertures.apercentre(apermask: numpy.ndarray, pix: numpy.ndarray) → numpy.ndarray

Function that centers a precomputed aperture mask on a given pixel.

Parameters
  • apermask (np.ndarray) – Aperture mask that is to be centred.

  • pix (List[int]) – Central pixel indicies.

Returns

mask – Returns aperture mask centered on central pixel, pix.

Return type

np.ndarray

pawlikMorphLSST.apertures.aperpixmap(npix: int, rad: float, nsubpix: int, frac: float) → numpy.ndarray

Calculate aperture binary mask.

Calculates the aperture binary mask through pixel sampling knowing the aperture radius and number of subpixels.

Near direct translation of IDL code.

Parameters
  • npix (int) – Width of aperture image.

  • rad (float) – Radius of the aperture.

  • nsubpix (int) – Number of subpixels

  • frac (float) – Fraction of something… Maybe due to Petrosian magnitude?

Returns

Numpy array that stores the mask.

Return type

np.ndarry