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.
Empirical Analysis
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.
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_spt(): 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_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.
Physical and Basic Parameters
bol_lum(): Calculates bolometric luminosity by integrating an observed SED, optionally complemented with a model spectrum (see tutorial_bolometric_luminosity).
teff(): Derives effective temperature from bolometric luminosity and radius using the Stefan–Boltzmann law, with Monte Carlo uncertainty propagation.
inclination(): Derives the rotation-axis inclination from projected rotation velocity (\(v\sin i\)), rotation period, and radius, with Monte Carlo uncertainty propagation (Vos et al. 2017).
evol_params(): Infers fundamental parameters (e.g., mass, age, surface gravity, temperature) by interpolating Available Evolutionary Models given a bolometric luminosity and radius (see tutorial_evolutionary_models_examination).
Atmospheric and Evolutionary Models
generate_model_spectrum(): Generates a synthetic spectrum with any parameters (within the grid coverage) from the indicated atmospheric models using interpolation techniques.
read_model_spectrum(): Reads a synthetic spectrum from Available Atmospheric Models.
separate_params(): Extracts parameters from model spectra file names.
plot_model_coverage()andplot_model_resolution(): Visualize parameters’ coverage and resolution of atmospheric Available Atmospheric Models (see tutorial_models_examination).
plot_evolutionary_coverage(): Visualize bolometric luminosity–radius coverage of bundled Available Evolutionary Models tables (see tutorial_evolutionary_models_examination).
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). SEDA uses the ATMO_2020_neweos_update’ models, available for download at. 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)
Available Evolutionary Models
\(\texttt{SEDA}\) can interpolate evolutionary models to infer fundamental parameters (mass, age, surface gravity, and effective temperature) from a bolometric luminosity and radius using evol_params(). Use plot_evolutionary_coverage() or tutorial_evolutionary_models_examination to inspect the coverage of the bundled evolutionary tables.
Sonora Bobcat Evolutionary Tables
Evolutionary tables accompanying the cloudless, chemical-equilibrium atmospheric models by Marley et al. (2021). Three *_mass tables (constant-mass cooling tracks) at solar C/O are bundled with \(\texttt{SEDA}\) for [M/H] = -0.5, 0.0, and 0.5. The original tables are also available from the Sonora Bobcat models (evolution_and_photometry archive).
Parameter coverage:
- mass = [0.52, 84] Mjup (0.0005 to 0.08 Msun)
- age = [0.001, 15] Gyr
- Lbol = [6.1e-10, 2.2e-3] Lsun (log L/Lsun = [-9.21, -2.66])
- R = [0.75, 2.59] Rjup
- logg = [2.65, 5.48] (g in cgs)
- Teff = [91, 2537] K
- Metallicity [M/H] = -0.5, 0.0, and 0.5 dex
- C/O = 1.0 (solar)
Bundled tables (pass as filename basename):
- ``nc-0.5_co1.0_mass`` ([M/H] = -0.5)
- ``nc+0.0_co1.0_mass`` ([M/H] = +0.0)
- ``nc+0.5_co1.0_mass`` ([M/H] = +0.5)
Sonora Diamondback Evolutionary Tables
Evolutionary tables accompanying the cloudy atmospheric models by Morley et al (2024). Nine *_mass tables (constant-mass cooling tracks) are bundled with \(\texttt{SEDA}\) for three cloud treatments (nc, hybrid_f2, and hybrid-grav_f2) at [M/H] = -0.5, 0.0, and 0.5. The original tables are also available from the Sonora Diamondback models.
Parameter coverage:
- mass = [0.52, 84] Mjup (0.0005 to 0.08 Msun)
- age = [0.002, 13] Gyr
- Lbol = [1.6e-8, 3.7e-3] Lsun (log L/Lsun = [-7.81, -2.43])
- R = [0.76, 2.5] Rjup
- logg = [2.57, 5.51] (g in cgs)
- Teff = [200, 2500] K
- Cloud treatment = ``nc``, ``hybrid_f2``, or ``hybrid-grav_f2``
- Metallicity [M/H] = -0.5, 0.0, and 0.5 dex
Bundled tables (pass as filename basename):
- ``nc_m-0.5_mass``, ``nc_m0.0_mass``, ``nc_m+0.5_mass`` (cloudless; [M/H] = -0.5, 0.0, +0.5)
- ``hybrid_f2_m-0.5_mass``, ``hybrid_f2_m0.0_mass``, ``hybrid_f2_m+0.5_mass`` (hybrid clouds, f\ :sub:`sed`\ = 2)
- ``hybrid-grav_f2_m-0.5_mass``, ``hybrid-grav_f2_m0.0_mass``, ``hybrid-grav_f2_m+0.5_mass`` (hybrid-grav clouds, f\ :sub:`sed`\ = 2)
For more information on these filenames, please refer to the ‘Evolution’ section at Sonora Diamondback models.
ATMO 2020 Evolutionary Tables
Evolutionary tables accompanying the cloudless atmospheric models by Phillips et al. (2020). Three *_mass.txt tables (constant-mass cooling tracks) are bundled with \(\texttt{SEDA}\) for equilibrium chemistry (CEQ) and non-equilibrium chemistry with weak (logKzz = 4) and strong (logKzz = 6) vertical mixing. The original tables are also available from the ATMO 2020 models.
Parameter coverage:
- mass = [1.05, 79] Mjup (0.001 to 0.075 Msun)
- age = [0.001, 10] Gyr
- Lbol = [1.8e-8, 5.4e-2] Lsun (log L/Lsun = [-7.74, -1.27])
- R = [0.74, 7.7] Rjup
- logg = [3.0, 5.5] (g in cgs)
- Teff = [207, 3160] K
- Chemistry = CEQ, NEQ_weak (logKzz = 4), or NEQ_strong (logKzz = 6)
Bundled tables (pass as filename basename):
- ``ATMO_CEQ_mass.txt`` (equilibrium chemistry)
- ``ATMO_NEQ_weak_mass.txt`` (non-equilibrium chemistry due to weak vertical mixing; logKzz = 4)
- ``ATMO_NEQ_strong_mass.txt`` (non-equilibrium chemistry due to strong vertical mixing; logKzz = 6)
BHAC15 Evolutionary Tables
Evolutionary tracks and internal-structure tables for brown dwarfs and low-mass stars by Baraffe et al. (2015). One tracks+structure table is bundled with \(\texttt{SEDA}\) covering 0.01 to 1.4 Msun. The original tables are also available from the BHAC15 models.
Parameter coverage:
- mass = [0.01, 1.4] Msun
- age = [5.69, 10.0] log10(yr) (~0.0005 to 10 Gyr)
- Lbol = [1.9e-5, 5.5] Lsun (log L/Lsun = [-4.72, 0.74])
- R = [0.84, 35.2] Rjup (0.086 to 3.62 Rsun)
- logg = [3.22, 5.39] (g in cgs)
- Teff = [1206, 6768] K
- log(Li/Li0) = [-11.2, 0.0] (ratio of surface lithium abundance to initial lithium abundance)
- log Tc = [5.42, 7.40] (log10 K) (central temperature)
- log rho_c = [-0.61, 2.88] (log10 g/cm^3) (central density)
- Mrad = [0.0, 1.4] Msun (radiative core mass)
- Rrad = [0.0, 1.75] Rsun (radiative core radius)
- k2conv = [0.0012, 0.49] (convective gyration radius)
- k2rad = [0.0, 0.31] (radiative gyration radius)
Bundled table (filename may be omitted):
- ``BHAC15_tracks+structure.txt``
evol_params() reads a bundled evolutionary table selected by filename.
If a model folder contains only one table, filename may be omitted. Inferred parameters
are returned in the native units defined in each model’s config.json (mass in Msun,
age in Gyr for Sonora/ATMO or log10(yr) for BHAC15, etc.). See Ingest New Evolutionary Models into SEDA to add custom models.