optixstuff.yippy_coronagraph#

YippyCoronagraph – AbstractCoronagraph backed by a yippy EqxCoronagraph.

Classes#

YippyCoronagraph

Coronagraph performance model backed by a yippy YIP interpolation table.

Module Contents#

class optixstuff.yippy_coronagraph.YippyCoronagraph(yip_path=None, *, backend=None, **kwargs)[source]#

Bases: optixstuff.coronagraph.AbstractCoronagraph

Coronagraph performance model backed by a yippy YIP interpolation table.

Wraps a yippy EqxCoronagraph via composition, adapting its methods to the AbstractCoronagraph interface. The _backend field is itself an eqx.Module, so its internal JAX arrays flow through filter_jit and filter_grad normally.

Construction mirrors EqxCoronagraph – pass either a YIP path or an existing EqxCoronagraph instance:

coro = YippyCoronagraph("/path/to/yip")
coro = YippyCoronagraph(backend=existing_eqx_coro)
Parameters:
_backend: yippy.EqxCoronagraph#
property pixel_scale_lod: float#

Native pixel scale in lambda/D per pixel.

Return type:

float

property IWA: float#

Inner working angle in lambda/D.

Return type:

float

property OWA: float#

Outer working angle in lambda/D.

Return type:

float

throughput(separation_lod, wavelength_nm, *, time_s=0.0)[source]#

Core throughput from the YIP interpolation table.

Parameters:
  • separation_lod (jax.typing.ArrayLike)

  • wavelength_nm (jax.typing.ArrayLike)

  • time_s (jax.typing.ArrayLike)

Return type:

jax.typing.ArrayLike

core_area(separation_lod, wavelength_nm, *, time_s=0.0)[source]#

Photometric aperture area from the YIP interpolation table.

Parameters:
  • separation_lod (jax.typing.ArrayLike)

  • wavelength_nm (jax.typing.ArrayLike)

  • time_s (jax.typing.ArrayLike)

Return type:

jax.typing.ArrayLike

core_mean_intensity(separation_lod, wavelength_nm, *, time_s=0.0)[source]#

Mean stellar leakage from the YIP interpolation table.

Parameters:
  • separation_lod (jax.typing.ArrayLike)

  • wavelength_nm (jax.typing.ArrayLike)

  • time_s (jax.typing.ArrayLike)

Return type:

jax.typing.ArrayLike

occulter_transmission(separation_lod, wavelength_nm, *, time_s=0.0)[source]#

Sky transmission from the YIP interpolation table.

Parameters:
  • separation_lod (jax.typing.ArrayLike)

  • wavelength_nm (jax.typing.ArrayLike)

  • time_s (jax.typing.ArrayLike)

Return type:

jax.typing.ArrayLike

on_axis_psf(wavelength_nm, pixel_scale_rad, npixels)[source]#

Stellar leakage PSF from the YIP stellar intensity model.

Parameters:
  • wavelength_nm (jax.typing.ArrayLike)

  • pixel_scale_rad (float)

  • npixels (int)

Return type:

jaxtyping.Array

off_axis_psf(wavelength_nm, separation_lod, pixel_scale_rad, npixels)[source]#

Off-axis planet PSF from the YIP PSF interpolator.

Places the planet along the +x axis by convention.

Parameters:
  • wavelength_nm (jax.typing.ArrayLike)

  • separation_lod (jax.typing.ArrayLike)

  • pixel_scale_rad (float)

  • npixels (int)

Return type:

jaxtyping.Array

noise_floor_ayo(separation_lod, ppf=30.0)[source]#

AYO noise floor: core_mean_intensity / ppf.

This is a convenience passthrough to the backend. Not part of the AbstractCoronagraph contract – downstream ETCs should compute noise floors as pure functions.

Parameters:
  • separation_lod (jax.typing.ArrayLike)

  • ppf (float)

Return type:

jax.typing.ArrayLike

raw_contrast(separation_lod)[source]#

Raw contrast from the YIP interpolation table.

Parameters:

separation_lod (jax.typing.ArrayLike)

Return type:

jax.typing.ArrayLike

stellar_intens(stellar_diam_lod)[source]#

Stellar intensity map for a given stellar angular diameter.

Parameters:

stellar_diam_lod (float)

Return type:

jaxtyping.Array

property psf_shape: tuple[int, int]#

Shape of the PSF arrays from the YIP file.

Return type:

tuple[int, int]

property sky_trans: jaxtyping.Array#

Full sky transmission map.

Return type:

jaxtyping.Array

create_psfs(x_lod, y_lod)[source]#

Batched off-axis PSFs at (x_lod, y_lod) source positions.

Delegates to the backend yippy create_psfs closure. Returns a stack of PSF images, one per input source coordinate.

Args:

x_lod: Source x-coordinates in lambda/D, shape (K,). y_lod: Source y-coordinates in lambda/D, shape (K,).

Returns:

PSF stack of shape (K, ny, nx) where (ny, nx) == self.psf_shape.

Parameters:
  • x_lod (jax.typing.ArrayLike)

  • y_lod (jax.typing.ArrayLike)

Return type:

jaxtyping.Array

property psf_datacube: jaxtyping.Array | None#

Pre-computed quarter-symmetric PSF datacube from the backend.

Returns None if the backing EqxCoronagraph was not built with ensure_psf_datacube=True. Consumers that need this for disk convolution should construct the backend with the flag set.

Return type:

jaxtyping.Array | None

__repr__()[source]#

One-line summary of YIP backend metadata.

Return type:

str