skyscapes.io
============

.. py:module:: skyscapes.io

.. autoapi-nested-parse::

   Data loaders for external simulation formats.



Submodules
----------

.. toctree::
   :maxdepth: 1

   /autoapi/skyscapes/io/_frames/index
   /autoapi/skyscapes/io/exovista/index


Functions
---------

.. autoapisummary::

   skyscapes.io.from_exovista
   skyscapes.io.get_earth_like_planet_indices


Package Contents
----------------

.. py:function:: from_exovista(fits_file, planet_indices = None, only_earths = False)

   Load an ExoVista FITS file into a ``scene.System``.

   The system's midplane inclination and position angle (FITS star
   header keys ``I`` and ``PA``) are applied at load time as a frame
   rotation of each planet's state vector before its Keplerian
   elements are computed. The same angles are stored as
   ``System.midplane_inc_deg`` and ``System.midplane_pa_deg`` for
   downstream diagnostic use.

   Args:
       fits_file: Path to ExoVista FITS file.
       planet_indices: Planet indices to load (0-based). ``None`` = all.
       only_earths: If True and *planet_indices* is None, auto-filter Earths.

   Returns:
       ``scene.System`` with star, planets (tuple), disk, and midplane metadata.


.. py:function:: get_earth_like_planet_indices(fits_file)

   Identify Earth-like planets in an ExoVista FITS file.

   Classification criteria:
     - Scaled semi-major axis: 0.95 <= a / sqrt(L_star) < 1.67 AU
     - Planet radius: 0.8 / sqrt(a_scaled) <= R < 1.4 R_earth


