optixstuff.yippy_coronagraph
============================

.. py:module:: optixstuff.yippy_coronagraph

.. autoapi-nested-parse::

   YippyCoronagraph -- AbstractCoronagraph backed by a yippy EqxCoronagraph.



Classes
-------

.. autoapisummary::

   optixstuff.yippy_coronagraph.YippyCoronagraph


Module Contents
---------------

.. py:class:: YippyCoronagraph(yip_path = None, *, backend = None, **kwargs)

   Bases: :py:obj:`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)


   .. py:attribute:: _backend
      :type:  yippy.EqxCoronagraph


   .. py:property:: pixel_scale_lod
      :type: float


      Native pixel scale in lambda/D per pixel.



   .. py:property:: IWA
      :type: float


      Inner working angle in lambda/D.



   .. py:property:: OWA
      :type: float


      Outer working angle in lambda/D.



   .. py:method:: throughput(separation_lod, wavelength_nm, *, time_s = 0.0)

      Core throughput from the YIP interpolation table.



   .. py:method:: core_area(separation_lod, wavelength_nm, *, time_s = 0.0)

      Photometric aperture area from the YIP interpolation table.



   .. py:method:: core_mean_intensity(separation_lod, wavelength_nm, *, time_s = 0.0)

      Mean stellar leakage from the YIP interpolation table.



   .. py:method:: occulter_transmission(separation_lod, wavelength_nm, *, time_s = 0.0)

      Sky transmission from the YIP interpolation table.



   .. py:method:: on_axis_psf(wavelength_nm, pixel_scale_rad, npixels)

      Stellar leakage PSF from the YIP stellar intensity model.



   .. py:method:: off_axis_psf(wavelength_nm, separation_lod, pixel_scale_rad, npixels)

      Off-axis planet PSF from the YIP PSF interpolator.

      Places the planet along the +x axis by convention.



   .. py:method:: noise_floor_ayo(separation_lod, ppf = 30.0)

      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.



   .. py:method:: raw_contrast(separation_lod)

      Raw contrast from the YIP interpolation table.



   .. py:method:: stellar_intens(stellar_diam_lod)

      Stellar intensity map for a given stellar angular diameter.



   .. py:property:: psf_shape
      :type: tuple[int, int]


      Shape of the PSF arrays from the YIP file.



   .. py:property:: sky_trans
      :type: jaxtyping.Array


      Full sky transmission map.



   .. py:method:: create_psfs(x_lod, y_lod)

      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.



   .. py:property:: psf_datacube
      :type: 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.



   .. py:method:: __repr__()

      One-line summary of YIP backend metadata.



