beetroots.simulations package

Subpackages

Submodules

beetroots.simulations.abstract_simulation module

class beetroots.simulations.abstract_simulation.Simulation[source]

Bases: ABC

abstract class for the main class of the inversion. Its instanciations set up, launch and analyze the results of inversions.

classmethod check_input_params_file(params: dict, schema: dict) None[source]

checks the validity of the params contained in the .yaml input file using the cerberus python package

Parameters:
  • params (dict) – content of the .yaml file

  • schema (dict) – cerberus validation schema

create_empty_output_folders(simu_name: str, path_yaml_file: str, path_outputs: str) None[source]

creates the directories that receive the results of the sampling, and saves the .yaml input file there for reproducibility

Parameters:
  • simu_name (str) – name of the simulation to be run

  • path_yaml_file (str) – path of the folder containing the data and yaml files

  • path_outputs (str) – folder where to write outputs

classmethod load_params(path_data_cloud: str, yaml_file: str) dict[source]
Parameters:
  • path_data_cloud (str) – path to the folder containing the .yaml input file. This folder should also contain the data necessary to set up the inversion.

  • yaml_file (str) – name of the .yaml input file to be read

Returns:

content of the .yaml input file

Return type:

dict

abstract classmethod parse_args()[source]
setup_plot_text_sizes(small_size: int = 16, medium_size: int = 20, bigger_size: int = 24) None[source]

defines text sizes on matplotlib plots

Parameters:
  • small_size (int, optional) – size for basic text, axes titles, xticks and yticks, by default 16

  • medium_size (int, optional) – size of the axis labels, by default 20

  • bigger_size (int, optional) – size of the figure title, by default 24

Module contents