yieldplotlib.load.exosims#

Nodes for EXOSIMS specific data files.

Submodules#

Classes#

EXOSIMSCSVFile

Node for handling reduced EXOSIMS CSV files.

DRMFile

Node for handling DRM-specific pickle files.

EXOSIMSInputFile

Node for handling the EXOSIMS input JSON files.

SPCFile

Node for handling SPC-specific pickle files.

Package Contents#

class yieldplotlib.load.exosims.EXOSIMSCSVFile(file_path)[source]#

Bases: yieldplotlib.core.CSVFile

Node for handling reduced EXOSIMS CSV files.

Parameters:

file_path (pathlib.Path)

transform_yield_hot_rocky(data)[source]#

Return the yield of Earth-like planets.

transform_yield_warm_rocky(data)[source]#

Return the yield of Earth-like planets.

transform_yield_cold_rocky(data)[source]#

Return the yield of Earth-like planets.

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

Return the data associated with the key.

Parameters:

key (str)

class yieldplotlib.load.exosims.DRMFile(file_path)[source]#

Bases: yieldplotlib.core.file_nodes.PickleFile

Node for handling DRM-specific pickle files.

Parameters:

file_path (pathlib.Path)

load()[source]#

Load the DRM file as a list of dictionaries.

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

Custom logic for DRM files.

Parameters:

key (str)

class yieldplotlib.load.exosims.EXOSIMSInputFile(file_path)[source]#

Bases: 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.

Parameters:

file_path (pathlib.Path)

file_path#
is_input = True#
used_modes = []#
used_insts = []#
used_systs = []#
_initialize_modes()[source]#

Initialize the used modes, instruments and systems.

process_input()[source]#

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.

_get_mode_dict(inst, syst)[source]#

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.

_get(key, inst=None, syst=None, **kwargs)[source]#

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.

create_exosims_objects()[source]#

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.

_get_comp_per_intTime(key, int_times=None, star_names=None)[source]#

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.

_get_core_thruput(*args, **kwargs)[source]#

Get the core thruput data.

class yieldplotlib.load.exosims.SPCFile(file_path)[source]#

Bases: yieldplotlib.core.file_nodes.PickleFile

Node for handling SPC-specific pickle files.

Parameters:

file_path (pathlib.Path)

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

Custom logic for SPC files.

Parameters:

key (str)