yieldplotlib.load.ayo#

AYO specific files.

Submodules#

Classes#

AYOCSVFile

Node for handling reduced AYO CSV files.

AYOInputFile

Node for handling AYO input files using PyParsing.

Package Contents#

class yieldplotlib.load.ayo.AYOCSVFile(file_path)[source]#

Bases: yieldplotlib.core.CSVFile

Node for handling reduced AYO CSV files.

Parameters:

file_path (pathlib.Path)

transform_star_name(data)[source]#

Add a prefix to the star_name data.

transform_WDS_sep(data)[source]#

Convert the WDS separation to floats.

transform_WDS_dmag(data)[source]#

Convert the WDS dMag to floats.

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

Return the data associated with the key.

Parameters:

key (str)

_get_blind_comp()[source]#

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.

_get_core_thruput()[source]#

Get the core thruput data.

class yieldplotlib.load.ayo.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)