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

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

.. autoapi-nested-parse::

   Nodes for EXOSIMS specific data files.



Submodules
----------

.. toctree::
   :maxdepth: 1

   /autoapi/yieldplotlib/load/exosims/exosims_csv/index
   /autoapi/yieldplotlib/load/exosims/exosims_drm/index
   /autoapi/yieldplotlib/load/exosims/exosims_input_file/index
   /autoapi/yieldplotlib/load/exosims/exosims_spc/index


Classes
-------

.. autoapisummary::

   yieldplotlib.load.exosims.EXOSIMSCSVFile
   yieldplotlib.load.exosims.DRMFile
   yieldplotlib.load.exosims.EXOSIMSInputFile
   yieldplotlib.load.exosims.SPCFile


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

.. py:class:: EXOSIMSCSVFile(file_path)

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


   Node for handling reduced EXOSIMS CSV files.


   .. py:method:: transform_yield_hot_rocky(data)

      Return the yield of Earth-like planets.



   .. py:method:: transform_yield_warm_rocky(data)

      Return the yield of Earth-like planets.



   .. py:method:: transform_yield_cold_rocky(data)

      Return the yield of Earth-like planets.



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

      Return the data associated with the key.



.. py:class:: DRMFile(file_path)

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


   Node for handling DRM-specific pickle files.


   .. py:method:: load()

      Load the DRM file as a list of dictionaries.



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

      Custom logic for DRM files.



.. 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:class:: SPCFile(file_path)

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


   Node for handling SPC-specific pickle files.


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

      Custom logic for SPC files.



