Overview
\(\texttt{SEDA}\) (Spectral Energy Distribution Analyzer) is an open-source Python package for forward modeling and empirical analysis of spectral energy distributions for brown dwarfs, directly imaged exoplanets, and low-mass stars.
This PDF file introduces the code and its main functionality as of January 2025, as presented at the 245th AAS meeting.
Principal Modules
For Forward Modeling
input_parameters: Defines all input parameters, namelyInputData,ModelOptions,Chi2Options, andBayesOptions.
chi2_fit: Provides the main functionchi2(), which finds the best model fits from Available Atmospheric Models using the LMFIT non-linear least-squares minimization Python package by (Newville et al. 2014).
bayes_fit: Provides the main functionbayes(), which estimates Bayesian posteriors using dynesty dynamic nested sampling package by (Speagle 2020).
plots: Includes functions for visualizing results generated by the modules above.
For Empirical Analysis
spectral_indices: Measures spectral indices to quantify the depth of key spectral features in the data.
synthetic_photometry: Derive synthetic phothometry from spectra for any SVO filter IDs.
utils: Provides additional useful functions (see Useful Tools for details).
Code Workflow of Forward Modeling
Download any Available Atmospheric Models.
Load input data (
InputData).Load model options (
ModelOptions).Option 1: chi-square minimization (see tutorial_chi2_fit_single_spectrum and/or tutorial_chi2_fit_multiple_spectra).
Load chi-square fit options (
Chi2Options).Run chi-square minimization (
chi2()).Option 2: Bayesian sampling (see tutorial_bayes_fit_single_spectrum and/or tutorial_bayes_fit_multiple_spectra spectra).
Load Bayesian fit options (
BayesOptions).Run Bayesian framework module (
bayes()).Visualize the results (
plots)
Useful Tools
- \(\texttt{SEDA}\) includes several useful functions that can be used separately:
synthetic_photometry(): Calculates synthetic phothometry from spectra for any SVO filter IDs (see tutorial_synthetic_photometry).spectral_indices: Measures the depth of absorption features using literature-defined or user-defined spectral indices. It includes:silicate_index()to assess cloudiness via the 9 microns silicate absorption (Suárez & Metchev 2022, Suárez & Metchev 2023).water_index()for the 6.25 microns water absorption,methane_index()for the 7.65 microns methane feature, andammonia_index()for the 10.5 microns ammonia feature (Cushing et al. 2006, Suárez & Metchev 2022, Suárez & Metchev 2023) (see tutorial_spectral_indices and spectral_indices).Near-infrared indices designed to identify potential variable objects (Ashraf et al. 2022, Oliveros-Gomez et al. 2022, Oliveros-Gomez et al. 2024).
user_index()for a user-defined spectral index, using the same approaches as the literature-defined indices described above.
generate_model_spectrum(): Generates a synthetic spectrum with any parameters (within the grid coverage) from the indicated atmospheric models using interpolation techniques.plot_model_coverage()andplot_model_resolution(): Visualize parameters’ coverage and resolution of Available Atmospheric Models (see tutorial_models_examination ).read_SVO_params(): Reads parameters of interest (e.g., effective wavelength, effective width, and zero point) from SVO for a list of filters.convolve_spectrum(): Convolves spectra to a desired resolution at a given wavelength.flux_to_mag(): Converts fluxes into magnitudes for any SVO filter IDs.mag_to_flux(): Converts magnitudes into fluxes for any SVO filter IDs.convert_flux(): Converts fluxes from wavelength units (erg/s/cm2/s) to frequency units (Jy) or vice versa.spt_to_teff(): Estimates effective temperatures from spectral types using relationships in the literature.teff_to_teff(): Estimates spectral type from effective temperature, using numerical inversion ofspt_to_teff().app_to_abs_flux(): Converts apparent fluxes into absolute fluxes considering a distance.read_model_spectrum(): Reads a synthetic spectrum from Available Atmospheric Models.separate_params(): Extracts parameters from model spectra file names.
Available Atmospheric Models
\(\texttt{SEDA}\) can use several modern and widely used atmospheric models, as indicated below. Check out tutorial_models_examination to see the parameters’ coverage and resolution of the models.
Sonora Diamondback Models
Cloudy (silicate clouds) atmospheric models assuming chemical equilibrium but considering the effect of both clouds and metallicity by Morley et al (2024). Download the Sonora Diamondback models.
Parameter coverage:
- wavelength = [0.3, 250] um
- Teff = [900, 2400] K in steps of 100 K
- logg = [3.5, 5.5] in steps of 0.5
- [M/H] = [-0.5, 0.5] (cgs) in steps of 0.5
- fsed = 1, 2, 3, 4, 8, nc
Sonora Elf Owl Models
Models with atmospheric mixing and chemical disequilibrium with varying metallicity and C/O by Mukherjee et al. (2024). Download the Sonora Elf Owl models for L-type, T-type, and Y-type.
Parameter coverage:
- wavelength = [0.6, 15] um
- Teff = [275, 2400] K in steps: 25 K for 275-600 K, 50 K for 600-1000 K, and 100 K for 1000-2400 K
- logg = [3.25, 5.50] in steps of 0.25 dex plus logg=3.0 for Teff=[275-2000], logKzz=8, [M/H]=1.0, and C/O=1.0.
- logKzz = 2, 4, 7, 8, and 9 (Kzz in cm2/s)
- [M/H] = -1.0, -0.5, +0.0, +0.5, +0.7, and +1.0 (cgs)
- C/O = 0.5, 1.0, 1.5, 2.5 (relative to solar C/O, assumed as 0.458) (these are the values in the filenames). It corresponds to C/O=[0.22, 1.12] with values of 0.22, 0.458, 0.687, and 1.12 (e.g. 0.5 in the filename means 0.5*0.458=0.22)
Lacy & Burrows (2023) Models
Cloudy (water clouds) atmospheric models with equilibrium and non-equilibrium chemistry for Y-dwarf atmospheres by Lacy & Burrows (2023). Download the LB23 models. The extended models are shared on request to the authors. The models include four grids:
ClearEQ: cloudless models with equilibrium chemistry
ClearNEQ: cloudless models with non-equilibrium chemistry
CloudyEQ: cloudy models with equilibrium chemistry
CloudyNEQ: cloudy models with non-equilibrium chemistry
Parameter coverage in common for all grids:
- wavelength = [0.5, 300] um with 30,000 frequency points evenly spaced in ln(frequency)
- R~4340 (average resolving power)
Parameter coverage for cloudless models:
- Teff = [200, 600] K in steps of 25 K
- logg = [3.50, 5.00] in steps of 0.25 (g in cgs)
- [M/H] = -0.5, 0.0, and 0.5 (Z/Z_sun = 0.316, 1.0, 3.16)
- logKzz = 6 for non-equilibrium models
Parameter coverage for cloudy models (there are some additional cloudy atmospheres extending to lower surface gravities and warmer temperatures in some combinations where convergence was easy):
- Teff = [200, 400] K (200-350 for Z/Z_sun=3.16) in steps of 25 K
- logg = [3.75, 5.00] in steps of 0.25 (g in cgs)
- [M/H] = -0.5, 0.0, and 0.5 (Z/Z_sun = 0.316, 1.0, 3.16), but some Z/Z_sun=3.16 are missing
- logKzz = 6 for non-equilibrium models
Extended models (additions to models in the paper). This grid replaces the original one (“The original spectra had an inconsistent wavelength grid and was missing CO2, so new ones are really a replacement.”)
- Teff up to 800 K
- Hmix (mixing length) = 1.0, 0.1, and 0.01
Sonora Cholla Models
Cloudless models with non-equilibrium chemistry due to different eddy diffusion parameters by Karalidi et al. (2021). Download the Sonora Cholla models.
Parameter coverage:
- wavelength = [1, 250] um for Teff>=850 K (plus some with Teff=750 K)
- wavelength = [0.3, 250] um for Teff<800 K (plus 950K_1780g_logkzz2.spec)
- Teff = [500, 1300] K in steps of 50 K
- logg = [3.00, 5.50] in steps of 0.25 (g in cgs)
- log Kzz=2, 4, and 7
Sonora Bobcat Models
Cloudless models in chemical equilibrium by Marley et al. (2021). Download the Sonora Bobcat models.
Parameter coverage:
- wavelength = [0.4, 50] um
- Teff = [200, 2400] K in steps: 25 K for 200-600 K, 50 K for 600-1000 K, and 100 K for 1000-2400 K
- logg = [3.25, 5.50] in steps of 0.25 (g in cgs)
- M/H=-0.5, 0.0, and 0.5
- C/O = 0.5, 1.0 (solar C/O), and 1.5 for solar metallicity models
- R = [6000, 200000] (the resolving power varies with wavelength but is otherwise the same for all spectra)
ATMO 2020 Models
Cloudless atmospheric models with chemical and non-chemical equilibrium by Phillips et al. (2020). Download the ATMO 2020 models. The models include three grids:
ATMO2020_CEQ: cloudless models with equilibrium chemistry.
ATMO2020_NEQ_weak: cloudless models with non-equilibrium chemistry due to weak vertical mixing (logKzz=4).
ATMO2020_NEQ_strong: cloudless models with non-equilibrium chemistry due to strong vertical mixing (logKzz=6).
Parameter coverage:
- wavelength = [0.2, 2000] um
- Teff = [200, 2400] K in steps varying from 25 K to 100 K
- logg = [2.5, 5.5] in steps of 0.5 (g in cgs)
- logKzz = 0 (ATMO2020_CEQ), 4 (ATMO2020_NEQ_weak), and 6 (ATMO2020_NEQ_strong)
BT-Settl Models
Cloudy models with non-equilibrium chemistry by Allard et al. (2012). Download the BT-Settl models.
Parameter coverage:
- wavelength = [1.e-4, 1000] um
- Teff = [200, 7000] K (Teff<=450 K for only logg<=3.5) in steps varying from 20 K to 100 K
- logg = [2.0, 5.5] in steps of 0.5 (g in cgs)
- R = [100000, 500000] (the resolving power varies with wavelength)
Saumon & Marley (2008) Models
Cloudy models with equilibrium chemistry by Saumon & Marley (2008). SM08 models are shared on request to the authors.
Parameter coverage:
- wavelength = [0.4, 50] um
- Teff = [800, 2400] K in steps of 100 K
- logg = [3.0, 5.5] in steps of 0.5 (g in cgs)
- fsed = 1, 2, 3, 4
- R = [100000, 700000] (the resolving power varies with wavelength)