GUIBRUSHR.General_Constants.FunctionsAndConstants.general_functions module

General utility functions for GUIBRUSHR atmospheric retrieval analysis.

This module re-exports functions from the new core/functions/ package for backward compatibility. New code should import directly from the specific submodules in GUIBRUSHR.core.functions instead.

Submodules:
  • core.functions.spectroscopy: Convolution, rotational broadening, mass calculations

  • core.functions.io_utils: FITS I/O, CSV handling, stellar spectrum management

  • core.functions.plotting: Colormaps, T-P profiles, VMR plots, contribution plots

  • core.functions.pca: PCA-based detrending

  • core.functions.cross_correlation: Radial velocity calculations

  • core.functions.statistics: MCMC statistics, transit durations, linear algebra

GUIBRUSHR.General_Constants.FunctionsAndConstants.general_functions.ask_stellar_params(parent=None, stellar_teff: float | None = None) Tuple[float | None, float | None, float | None][source]

Open stellar parameter dialog and return user-specified stellar properties.

This convenience function creates and displays a modal dialog for entering stellar atmospheric parameters needed for synthetic spectrum generation. The dialog allows input of effective temperature, surface gravity, and metallicity with validation and reasonable defaults.

Parameters:
  • parent (tk.Misc or None, optional) – Parent widget for the dialog. If None, uses default root window or creates a new Tk instance, by default None

  • stellar_teff (float or None, optional) – Initial effective temperature value to populate in the dialog, by default None

Returns:

Tuple containing stellar parameters: - T_eff : Effective temperature in Kelvin (rounded to 5 digits) - log_g : Surface gravity in cgs units (log10(g)) - Fe_H : Metallicity [Fe/H] in dex

Returns (None, None, None) if user cancels or closes dialog

Return type:

tuple[float or None, float or None, float or None]

Notes

The stellar parameters are used to select appropriate stellar atmosphere models for synthetic spectrum generation. The dialog provides validation to ensure physically reasonable values are entered.