beetroots.simulations.astro.observation package

Submodules

beetroots.simulations.astro.observation.abstract_observation module

class beetroots.simulations.astro.observation.abstract_observation.SimulationObservation(simu_name: str, cloud_name: str, max_workers: int, params_names: Dict[str, str], list_lines_fit: List[str], yaml_file: str, path_data: str, path_outputs: str, path_models: str, forward_model_fixed_params: Dict[str, float | None], pixels_of_interest: Dict[int, str] = {}, small_size: int = 16, medium_size: int = 20, bigger_size: int = 24)[source]

Bases: AstroSimulation, ABC

Parameters:
  • simu_name (str) – name of the full inversion procedure, used to name the outputs folder

  • cloud_name (str) – name of the observed cloud

  • max_workers (int, optional) – maximum number of workers to run the program

  • params_names (Dict[str, str]) – pairs of names for each parameter, with first the standard name (to be found as title of column in DataFrames) and second a latex name (to be displayed in figures). For instance, for the thermal pressure “P”: r”$P_{th}$)”

  • list_lines_fit (List[str]) – names of the observables used for the inversion

  • max_workers – maximum number of workers that can be used for inversion or results extraction, by default 10

  • 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

  • path_outputs (str) – path to the output folder to be created

save_and_plot_setup(dict_posteriors: dict, lower_bounds_lin: ndarray, upper_bounds_lin: ndarray, scaler: Scaler)[source]
abstract setup_observation()[source]

beetroots.simulations.astro.observation.abstract_real_data module

class beetroots.simulations.astro.observation.abstract_real_data.SimulationRealData(simu_name: str, cloud_name: str, max_workers: int, params_names: Dict[str, str], list_lines_fit: List[str], yaml_file: str, path_data: str, path_outputs: str, path_models: str, forward_model_fixed_params: Dict[str, float | None], pixels_of_interest: Dict[int, str] = {}, small_size: int = 16, medium_size: int = 20, bigger_size: int = 24)[source]

Bases: SimulationObservation

abstract class that reads the observation data for real observations

Parameters:
  • simu_name (str) – name of the full inversion procedure, used to name the outputs folder

  • cloud_name (str) – name of the observed cloud

  • max_workers (int, optional) – maximum number of workers to run the program

  • params_names (Dict[str, str]) – pairs of names for each parameter, with first the standard name (to be found as title of column in DataFrames) and second a latex name (to be displayed in figures). For instance, for the thermal pressure “P”: r”$P_{th}$)”

  • list_lines_fit (List[str]) – names of the observables used for the inversion

  • max_workers – maximum number of workers that can be used for inversion or results extraction, by default 10

  • 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

  • path_outputs (str) – path to the output folder to be created

setup_observation(data_int_path: str, data_err_path: str, save_obs: bool = True) Tuple[DataFrame, ndarray, ndarray, ndarray, ndarray, ndarray, ndarray][source]

reads the observation data for real observations

Parameters:
  • data_int_path (str) – path to the .pkl file that contains the observation maps

  • data_err_path (str) – path to the .pkl file that contains the maps of additive noise standard deviation

  • save_obs (bool, optional) – by default True

Returns:

  • df_int_fit (pd.DataFrame) – DataFrame containing the observations used for inference

  • y_fit (np.ndarray of shape (N, L)) – observations to be used for inference

  • sigma_a_fit (np.ndarray of shape (N, L)) – additive noise standard deviations associated with the observations used for inference

  • omega_fit (np.ndarray of shape (N, L)) – censor threshold associated with the observations used for inference

  • y_valid (np.ndarray of shape (N, L_valid)) – observations that are not to be used for inference

  • sigma_a_valid (np.ndarray of shape (N, L_valid)) – additive noise standard deviations associated with the observations not used for inference

  • omega_valid (np.ndarray of shape (N, L_valid)) – censor threshold associated with the observations not used for inference

beetroots.simulations.astro.observation.abstract_toy_case module

class beetroots.simulations.astro.observation.abstract_toy_case.SimulationToyCase(simu_name: str, cloud_name: str, max_workers: int, params_names: Dict[str, str], list_lines_fit: List[str], yaml_file: str, path_data: str, path_outputs: str, path_models: str, forward_model_fixed_params: Dict[str, float | None], pixels_of_interest: Dict[int, str] = {}, small_size: int = 16, medium_size: int = 20, bigger_size: int = 24)[source]

Bases: SimulationObservation

Parameters:
  • simu_name (str) – name of the full inversion procedure, used to name the outputs folder

  • cloud_name (str) – name of the observed cloud

  • max_workers (int, optional) – maximum number of workers to run the program

  • params_names (Dict[str, str]) – pairs of names for each parameter, with first the standard name (to be found as title of column in DataFrames) and second a latex name (to be displayed in figures). For instance, for the thermal pressure “P”: r”$P_{th}$)”

  • list_lines_fit (List[str]) – names of the observables used for the inversion

  • max_workers – maximum number of workers that can be used for inversion or results extraction, by default 10

  • 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

  • path_outputs (str) – path to the output folder to be created

setup_observation(scaler: MyScaler, forward_map: ForwardMap, sigma_a: ndarray, sigma_m: ndarray, omega: ndarray) Tuple[DataFrame, ndarray][source]

Module contents