In/Out¶
- class DeepSurveySim.IO.ReadConfig(observator_configuration=None, survey=False)¶
Read a .yaml file to a dictionary, and adds defaults
- Parameters:
observator_configuration (Union[None, str], optional) – Path to configuration file to read. Defaults to None.
survey (bool, optional) – Read a survey configuration, filling in those defaults. Defaults to False.
Examples
>>> observatory_config = IO.ReadConfig(observatory_config_path)() survey_config = IO.ReadConfig(survey_config_path, survey=True)()
- static load_yaml(config_path)¶
Read a yaml file from a path
- Parameters:
config_path (str) – path to file, .yaml or .yml.
- Returns:
Read contents of the config
- Return type:
dict
- class DeepSurveySim.IO.SaveSimulation(survey_instance, survey_results)¶
Save a run survey to a json (survey results) and the config file used to generate it (yaml)
- Parameters:
survey_instance (Survey.Survey) – Survey used to generate the simulation
survey_results (dict) – Run survey results - format of <mjd>:{variable:[value]}
Examples
>>> survey = Survey.Survey(obseravtory_config, survey_config) survey_results = survey() IO.SaveSimulation(survey, survey_results)()
- save_config()¶
Save config of run to the path of “/survey_{id}/run_config.yaml”
- save_results()¶
Save results to the path of “/survey_{id}/survey_results.json”