GUIBRUSHR.Retrieval.ModelCalculation.Classes.Retrieval module

Retrieval class for astronomical data processing and model calculations.

This module contains the Retrieval class which handles the initialization and configuration of retrieval parameters for astronomical observations.

class GUIBRUSHR.Retrieval.ModelCalculation.Classes.Retrieval.Retrieval(scale, chemistry=None, ecc_opi=None, tell_rm_method=None, model_reprocessing=None, format_temperature=None, table_output_file=None, maxsteps=None, order_sel=None, id_process=None, path_results=None, retrieval_model=None, manual_model_obj=None, total_nights=0, total_hr_instruments=0, standardize_PCA='From pkl', mask_phase_enabled=False, mask_night_index=None, min_phase=None, max_phase=None, mask_inside_range=False, transit_limit_mode='T14', nthin=1, init_scatter_factor=2.0, epsilon_scale_divisor=100.0, use_map_optimizer=False, map_maxiter_global=40, map_popsize=10, map_tol_global=0.01, map_maxiter_local=150, init_mode='isotropic', mcmc_sampler='DE-MC', range_min_vector=None, range_max_vector=None, gelman_rubin_threshold=1.01, maxnpass=6, save_chain_debug=True)[source]

Bases: object

A class to handle retrieval parameters and configuration for astronomical data processing.

This class manages various parameters related to atmospheric retrieval models, including chemistry settings, temperature formatting, telluric removal methods, and output configurations.

__init__(scale, chemistry=None, ecc_opi=None, tell_rm_method=None, model_reprocessing=None, format_temperature=None, table_output_file=None, maxsteps=None, order_sel=None, id_process=None, path_results=None, retrieval_model=None, manual_model_obj=None, total_nights=0, total_hr_instruments=0, standardize_PCA='From pkl', mask_phase_enabled=False, mask_night_index=None, min_phase=None, max_phase=None, mask_inside_range=False, transit_limit_mode='T14', nthin=1, init_scatter_factor=2.0, epsilon_scale_divisor=100.0, use_map_optimizer=False, map_maxiter_global=40, map_popsize=10, map_tol_global=0.01, map_maxiter_local=150, init_mode='isotropic', mcmc_sampler='DE-MC', range_min_vector=None, range_max_vector=None, gelman_rubin_threshold=1.01, maxnpass=6, save_chain_debug=True)[source]

Initialize the Retrieval object with configuration parameters.

Parameters:
  • scale – Scale vector parameters for the retrieval process

  • chemistry – Chemistry configuration for atmospheric modeling

  • ecc_opi – Eccentricity and orbital parameters information

  • tell_rm_method – Method for telluric removal

  • model_reprocessing – Model reprocessing configuration

  • format_temperature – Temperature formatting settings

  • table_output_file – Output file path for tabulated results

  • maxsteps – Maximum number of steps for the retrieval algorithm

  • order_sel – Order selection parameters

  • id_process – Process identifier

  • path_results – Path where results will be stored

  • retrieval_model – The retrieval model to be used

  • manual_model_obj – Manual model object containing pre-configured parameters

  • standardize_PCA – PCA standardization mode (default: “From pkl”)

  • total_nights – Total number of observation nights (default: 0)

  • total_hr_instruments – Total number of HR instruments used (default: 0)

  • mask_phase_enabled – Flag indicating whether to apply a mask to the phase data (default: False)

  • mask_night_index – Index of the night to be masked (default: None)

  • min_phase – Minimum phase value to be masked (default: None)

  • max_phase – Maximum phase value to be masked (default: None)

  • mask_inside_range – Flag indicating whether to mask data inside the specified phase range (default: False)

  • nthin – Thinning factor — proposals per saved MCMC step (default: 1, no thinning)

  • init_scatter_factor – Multiplicative factor for initial chain scatter (default: 2.0, G-R overdispersed starts)

  • epsilon_scale_divisor – Divisor in the uniform DE-MCMC epsilon perturbation epsilon = (U-0.5)*2*scale/epsilon_scale_divisor (ter Braak 2006 §2.3; IDL/EXOFAST uses 100). Must be > 0. Default 100.0.

  • use_map_optimizer – When True, run a bounded MAP optimization before DE-MCMC and use the optimum as list_bestpars_initial_value (default: False, keep the user-provided starting point).

  • map_maxiter_global – Max iterations for the differential evolution stage of the MAP optimizer (default: 40).

  • map_popsize – Population size multiplier for differential evolution (population = popsize * nfit) (default: 10).

  • map_tol_global – Relative tolerance for differential evolution early-stop (default: 1e-2).

  • map_maxiter_local – Max iterations for the Nelder-Mead polish stage of the MAP optimizer; set to 0 to skip the polish (default: 150).

  • gelman_rubin_threshold – Upper bound on R-hat used by exofast_gelmanrubin to declare chain convergence (default 1.01; canonical Gelman-Rubin cutoff). Must be > 1.0. Raise (e.g. 1.05, 1.1) for faster but less strict stopping on hard retrievals; lower (e.g. 1.005) to demand tighter mixing.

  • maxnpass – Number of consecutive Gelman-Rubin checks that must all pass before convergence is declared and the run stops (default 6, the canonical EXOFAST/Ford 2006 value). A single failed check resets the counter. Must be an integer >= 1. Lower (e.g. 2-3) for faster stopping; raise to demand more sustained mixing.

  • save_chain_debug – When True (default), the MCMC driver writes the per-step JSONL stream to {path_results}/debug/retrieval_debug.jsonl so the GUI “Analyse Chains” tool can plot acceptance / proposal diagnostics. When False, no debug folder is created — useful for long production runs where the JSONL would balloon to GBs.

Note: The MAP optimizer reuses the MCMC seed via SeedSequence.spawn(), so reproducibility is controlled by the existing ‘seed’ field. There is intentionally no separate map_seed.