synthpop.synthpop_utils.synthpop_control

This file contains the Parameters Class. Its task is to handel the configuration of SynthPop from the config files a Keyword input . And provide the different task in a Namespace Object.

Classes

ModuleKwargs

PopParams

Parameters

NameSpace object to store the configuration parameters

Functions

parser(→ argparse.Namespace)

synthpop control and help interface

Module Contents

class synthpop.synthpop_utils.synthpop_control.ModuleKwargs

Bases: pydantic.BaseModel

name: str | None = ''
filename: str | None = ''
classmethod validate_filename(values)
property init_kwargs
class synthpop.synthpop_utils.synthpop_control.PopParams

Bases: pydantic.BaseModel

name: str
imf_func_kwargs: ModuleKwargs
age_func_kwargs: ModuleKwargs
metallicity_func_kwargs: ModuleKwargs
population_density_kwargs: ModuleKwargs
kinematics_func_kwargs: ModuleKwargs
evolution_kwargs: ModuleKwargs | List[ModuleKwargs] | None = None
av_mass_corr: float | None = None
n_star_corr: float | None = None
classmethod parse_jsonfile(filename)
class synthpop.synthpop_utils.synthpop_control.Parameters(specific_config: str or None = None, default_config: str = DEFAULT_CONFIG_FILE, model_dir: str = DEFAULT_MODEL_DIR, **kwargs)

NameSpace object to store the configuration parameters defined by keyword arguments, and in the configuration files

l_set = None
l_set_type = None
b_set = None
b_set_type = None
_categories
loc
model_dir
sun
extinction_map_kwargs
validate_mandatory_input()

checks if all Mandatory files are provided

location_generator() Iterator[Tuple[float, float]]

converts l_set and b_set into a location generator object as defined by the l/b_set_type

rest_loc_iterator()
log_settings()

log the settings as json formatted file

read_default_config(default_config_file: str)

reads settings from keyword arguments

Parameters

default_config_file: str

file and path of the default configuration file

Return

config_dir: str

directory of default_config_file.

read_specific_config(config_file: str or None, config_dir: str = '.')

reads settings from keyword arguments Parameters ———- config_file: str

file and path of the configuration file

config_dir: str

directory where config files can be found

read_kwargs_config(kwargs: dict)

reads settings from keyword arguments

Parameters

kwargs: dict

dictionary of specifications

synthpop.synthpop_utils.synthpop_control.parser() argparse.Namespace

synthpop control and help interface