GUIBRUSHR.Retrieval.main module

Main script for running atmospheric retrieval using MCMC sampling.

This script serves as the entry point for performing atmospheric retrieval analysis on exoplanet spectra. It initializes a ModelData object with the provided parameters and runs Monte Carlo Markov Chain (MCMC) sampling using the exofast_demc algorithm.

Usage:

python main.py <path_params> <path_df> <table_output_file> <id_process> <path_default> <moresteps>

param path_params:

Path to parameter configuration file

param path_df:

Path to dataframe file containing observational data

param table_output_file:

Path for output table file

param id_process:

Process ID for parallel execution

param path_default:

Default working directory path

param moresteps:

Boolean string (“True”/”False”) to continue from previous run

Author: GUIBRUSHR Team License: [License information if available]

GUIBRUSHR.Retrieval.main.parse_command_line_arguments()[source]

Parse and validate command line arguments.

Returns:

A tuple containing (path_params, path_df, table_output_file, id_process, path_default, moresteps_bool)

Return type:

tuple

Raises:

SystemExit – If incorrect number of arguments provided

GUIBRUSHR.Retrieval.main.create_model_object(path_params, path_df, id_process, table_output_file, path_default)[source]

Create and configure the ModelData object for retrieval.

This function initializes the ModelData object with all necessary parameters for atmospheric retrieval analysis.

Parameters:
  • path_params (str) – Path to parameter configuration file

  • path_df (str) – Path to dataframe file containing observational data

  • id_process (str) – Process ID for parallel execution

  • table_output_file (str) – Path for output table file

  • path_default (str) – Default working directory path

Returns:

Configured ModelData object ready for retrieval

Return type:

ModelData.ModelData

GUIBRUSHR.Retrieval.main.setup_output_directory(model_obj)[source]

Create the output directory for retrieval results.

Parameters:

model_obj (ModelData.ModelData) – The model object containing path information

GUIBRUSHR.Retrieval.main.run_mcmc_sampling(model_obj, moresteps)[source]

Execute Monte Carlo Markov Chain sampling using exofast_demc.

Parameters:
  • model_obj (ModelData.ModelData) – The configured model object

  • moresteps (bool) – Whether to continue from a previous run

Returns:

A tuple containing (parameters, chi2_values) from the MCMC sampling

Return type:

tuple

GUIBRUSHR.Retrieval.main.cleanup_and_report_timing(model_obj, start_time)[source]

Clean up resources and report execution timing.

Parameters:
  • model_obj (ModelData.ModelData) – The model object to clean up

  • start_time (float) – The start time from time.time()

GUIBRUSHR.Retrieval.main.main()[source]

Main function orchestrating the atmospheric retrieval process.

This function coordinates the entire retrieval workflow: 1. Set up environment paths 2. Parse command line arguments 3. Create and configure the model object 4. Run MCMC sampling 5. Clean up and report results