yieldplotlib.load.ayo.ayo_input#

Node for handling input .ayo files.

Attributes#

Classes#

AYOInputFile

Node for handling AYO input files using PyParsing.

Module Contents#

yieldplotlib.load.ayo.ayo_input.read = None#
yieldplotlib.load.ayo.ayo_input.zodis = None#
class yieldplotlib.load.ayo.ayo_input.AYOInputFile(file_path)[source]#

Bases: yieldplotlib.core.file_nodes.FileNode

Node for handling AYO input files using PyParsing.

Parameters:

file_path (pathlib.Path)

data#
is_input = True#
load()[source]#

Load the text file into memory.

_get(key, **kwargs)[source]#

Return the data associated with the key.

Parameters:

key (str)

parse()[source]#

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

_convert_array(tokens)[source]#

Convert parsed array tokens to a Python list.

_convert_unit(parsed_unit)[source]#

Convert parsed unit string to the appropriate astropy unit.

export_exosims(output_path, base_file=None, detection_wavelength_nm=None, characterization_wavelength_nm=None, **kwargs)[source]#

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”

Parameters:
  • output_path (str)

  • base_file (pathlib.Path | str | None)

  • detection_wavelength_nm (float | None)

  • characterization_wavelength_nm (float | None)