coronalyze.interfaces#

Interface adapters for integrating with external packages.

Submodules#

Functions#

analyze_observation(image, planet_pos, wavelength_nm)

High-level analysis: compute Mawet SNR for a planet detection.

extract_image(detector_readout)

Convert detector readout to an analysis-ready image.

get_fwhm(wavelength_nm[, diameter_m, pixel_scale_mas])

Calculate the FWHM of the PSF in pixels.

Package Contents#

coronalyze.interfaces.analyze_observation(image, planet_pos, wavelength_nm, diameter_m=6.0, pixel_scale_mas=21.8, max_apertures=200)[source]#

High-level analysis: compute Mawet SNR for a planet detection.

Convenience wrapper that combines FWHM calculation with SNR computation.

Args:

image: 2D detector image. planet_pos: Planet position (y, x) in pixels. wavelength_nm: Observation wavelength in nanometers. diameter_m: Primary aperture diameter in meters. pixel_scale_mas: Pixel scale in milliarcseconds per pixel. max_apertures: Maximum buffer size for static array shapes.

Returns:

Signal-to-noise ratio using Mawet 2014 methodology.

Parameters:
  • image (jax.numpy.ndarray)

  • planet_pos (tuple[float, float])

  • wavelength_nm (float)

  • diameter_m (float)

  • pixel_scale_mas (float)

  • max_apertures (int)

Return type:

float

coronalyze.interfaces.extract_image(detector_readout)[source]#

Convert detector readout to an analysis-ready image.

Currently a pass-through, but can be extended to handle: - Multiple detector planes - Unit conversions - Bad pixel masking

Args:

detector_readout: Raw detector output from coronagraphoto simulation.

Returns:

2D image array suitable for analysis.

Parameters:

detector_readout (jax.numpy.ndarray)

Return type:

jax.numpy.ndarray

coronalyze.interfaces.get_fwhm(wavelength_nm, diameter_m=6.0, pixel_scale_mas=21.8)[source]#

Calculate the FWHM of the PSF in pixels.

Uses the diffraction limit: FWHM ≈ λ/D

Args:

wavelength_nm: Observation wavelength in nanometers. diameter_m: Primary aperture diameter in meters. pixel_scale_mas: Pixel scale in milliarcseconds per pixel.

Returns:

FWHM in pixels.

Parameters:
  • wavelength_nm (float)

  • diameter_m (float)

  • pixel_scale_mas (float)

Return type:

float