yieldplotlib.load.exosims.exosims_input_file
============================================

.. py:module:: yieldplotlib.load.exosims.exosims_input_file

.. autoapi-nested-parse::

   Node for handling input json files.



Attributes
----------

.. autoapisummary::

   yieldplotlib.load.exosims.exosims_input_file.INST_KEYS
   yieldplotlib.load.exosims.exosims_input_file.SYST_KEYS
   yieldplotlib.load.exosims.exosims_input_file.MODE_KEYS
   yieldplotlib.load.exosims.exosims_input_file.EXOSIMS_PATHS
   yieldplotlib.load.exosims.exosims_input_file.TL_PARAMS
   yieldplotlib.load.exosims.exosims_input_file.SPECIAL_KEYS


Classes
-------

.. autoapisummary::

   yieldplotlib.load.exosims.exosims_input_file.EXOSIMSInputFile


Functions
---------

.. autoapisummary::

   yieldplotlib.load.exosims.exosims_input_file.export_ayo


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

.. py:data:: INST_KEYS
   :value: ['QE', 'optics', 'sread', 'idark', 'texp', 'pixelScale', 'Rs', 'lenslSamp', 'pixelNumber',...


.. py:data:: SYST_KEYS
   :value: ['syst_optics', 'syst_lam', 'syst_deltaLam', 'syst_BW', 'ohTime', 'occulter', 'contrast_floor',...


.. py:data:: MODE_KEYS
   :value: ['detectionMode', 'SNR', 'timeMultiplier', 'lam', 'deltaLam', 'BW']


.. py:data:: EXOSIMS_PATHS

.. py:data:: TL_PARAMS
   :value: ['Teff', 'coords_RA', 'coords_Dec', 'Umag', 'Bmag', 'Vmag', 'Rmag', 'Imag', 'Jmag', 'Hmag',...


.. py:data:: SPECIAL_KEYS

.. py:class:: EXOSIMSInputFile(file_path)

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


   Node for handling the EXOSIMS input JSON files.

   The `data` attribute holds the input JSON file as a dictionary. Additional
   information is generated by instantiating EXOSIMS objects (as possible) and
   extracting the relevant information when the `_get` method is called.


   .. py:attribute:: file_path


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



   .. py:attribute:: used_modes
      :value: []



   .. py:attribute:: used_insts
      :value: []



   .. py:attribute:: used_systs
      :value: []



   .. py:method:: _initialize_modes()

      Initialize the used modes, instruments and systems.



   .. py:method:: process_input()

      Process the input JSON file.

      Searches through the input file and attempts to load all hardcoded paths,
      deleting any that do not exist locally to avoid errors when instantiating
      the TargetList object.



   .. py:method:: _get_mode_dict(inst, syst)

      Get the dictionary for a given instrument and system.

      In EXOSIMS modes are actually identified by a hash of the full
      mode dictionary, but for this we're just looking for a used mode
      that matches the instrument and system.



   .. py:method:: _get(key, inst=None, syst=None, **kwargs)

      Custom logic for the input JSON files.

      This got a bit messy, but it handles loading from the input JSON file,
      the TargetList object, has reasonable defaults for the provided key,
      and has some management of units.

      Args:
          key (str):
              The key to look up in the data.
          inst (str, optional):
              Optional instrument name to get instrument-specific parameters.
          syst (str, optional):
              Optional system name to get system-specific parameters.
          **kwargs:
              Unused keyword arguments (usually for later `transform_data` calls).

      Returns:
          The value(s) associated with the key.



   .. py:method:: create_exosims_objects()

      Create a TargetList object from the input JSON file.

      NOTE: To instantiate the TargetList object, we need to remove all
      paths that do not exist locally. This can result in different
      information being used to instantiate the TargetList object.



   .. py:method:: _get_comp_per_intTime(key, int_times=None, star_names=None)

      Get the completeness per integration time.

      Args:
          key (str):
              The key to get the completeness for, either "blind_comp_det" or
              "blind_comp_spec".
          int_times (astropy.units.Quantity):
              The integration times.
          star_names (list):
              The names of the stars of interest.

      Returns:
          np.ndarray:
              The completeness values for each integration time and star.



   .. py:method:: _get_core_thruput(*args, **kwargs)

      Get the core thruput data.



.. py:function:: export_ayo(self, output_path)

   Export the current EXOSIMS input to an AYO input file.

   This method aggregates the discrete EXOSIMS Observing Modes into the
   wavelength-dependent arrays (lambda, SNR, SR, etc.) required by AYO.

   Args:
       self: EXOSIMSInputFile instance.
       output_path (str): The path to write the .ayo file to.


