yieldplotlib.load.ayo
=====================

.. py:module:: yieldplotlib.load.ayo

.. autoapi-nested-parse::

   AYO specific files.



Submodules
----------

.. toctree::
   :maxdepth: 1

   /autoapi/yieldplotlib/load/ayo/ayo_csv/index
   /autoapi/yieldplotlib/load/ayo/ayo_input/index


Classes
-------

.. autoapisummary::

   yieldplotlib.load.ayo.AYOCSVFile
   yieldplotlib.load.ayo.AYOInputFile


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

.. py:class:: AYOCSVFile(file_path)

   Bases: :py:obj:`yieldplotlib.core.CSVFile`


   Node for handling reduced AYO CSV files.


   .. py:method:: transform_star_name(data)

      Add a prefix to the star_name data.



   .. py:method:: transform_WDS_sep(data)

      Convert the WDS separation to floats.



   .. py:method:: transform_WDS_dmag(data)

      Convert the WDS dMag to floats.



   .. py:method:: _get(key, **kwargs)

      Return the data associated with the key.



   .. py:method:: _get_blind_comp()

      Get the blind completeness data from first visits.

      Returns:
          np.ndarray:
              A structured array with completeness, star names, and integration times
              for all first visits.



   .. py:method:: _get_core_thruput()

      Get the core thruput data.



.. py:class:: AYOInputFile(file_path)

   Bases: :py:obj:`yieldplotlib.core.file_nodes.FileNode`


   Node for handling AYO input files using PyParsing.


   .. py:attribute:: data


   .. py:attribute:: is_input
      :value: True



   .. py:method:: load()

      Load the text file into memory.



   .. py:method:: _get(key, **kwargs)

      Return the data associated with the key.



   .. py:method:: parse()

      Parse the AYO input file and populate the self.data dictionary.



   .. py:method:: _convert_array(tokens)

      Convert parsed array tokens to a Python list.



   .. py:method:: _convert_unit(parsed_unit)

      Convert parsed unit string to the appropriate astropy unit.



   .. py:method:: export_exosims(output_path, base_file = None, detection_wavelength_nm = None, characterization_wavelength_nm = None, **kwargs)

      Export the AYO input to an EXOSIMS JSON file.

      Args:
          output_path:
              Path to write the output JSON file.
          base_file:
              Optional path to a base EXOSIMS JSON file. If provided, AYO
              parameters will overwrite equivalent parameters in the base file,
              and all other parameters will be preserved.
          detection_wavelength_nm:
              Wavelength in nanometers to use for detection mode. The closest
              wavelength in the lambda array will be selected. If None, uses
              the middle wavelength (default).
          characterization_wavelength_nm:
              Wavelength in nanometers to use for characterization mode. The
              closest wavelength in the sc_lambda array will be selected. If
              None, uses the middle wavelength (default).
          **kwargs:
              Additional keyword arguments to include in the output JSON.
              These will overwrite any existing values. Useful for setting
              paths like cachedir, e.g.:
                  cachedir="$HOME/.EXOSIMS/2025/Natasha_JATIS"



