SED_Model is a Python package that offers advanced tools for generating synthetic spectral energy distributions (SEDs) and inferring stellar parameters from observed data using Bayesian methods. It integrates seamlessly with existing workflows and provides robust functionality for both forward and inverse modeling, making it vital for stellar astrophysics research.
SED_Model is an advanced Python package designed for synthetic photometry and stellar parameter inference, characterized by its capability to compute observer-ready synthetic spectral energy distributions (SEDs) as well as broadband magnitudes from stellar atmosphere grids. This repository offers functionality for recovering stellar parameters from observed photometry through a robust Bayesian MCMC inference approach.
Features
- Forward Model: Translates intrinsic stellar parameters such as effective temperature
(Teff), surface gravity(logg), metallicity[M/H], radius(R), and distance(d)into interpolated SEDs, bolometric flux, and magnitudes across various loaded filters. - Inverse Model: Converts observed magnitudes—coupled with their uncertainties—into a posterior distribution over stellar parameters, enabling optional recovery of foreground extinction
Avand distance, executed viaemceefor MCMC sampling.
Key Functionalities
- Efficient interpolation of 3D atmosphere grids using either Hermite or linear methods.
- Integration of photon-counting filter convolution compatible with Vega, AB, and ST photometric systems.
- Application of precomputed zero-points aligning with MESA conventions.
- Supports various interstellar dust extinction laws implemented in pure-NumPy.
- Provision of structured result containers, allowing data persistence through CSV and NPZ formats, and includes diagnostics for interpolation.
- Performance-critical paths optimized with Fortran kernels, compiled using
f2py/Meson.
Practical Application
Forward Modeling Example
from sed_model import load_grid, load_filters, run_forward
grid = load_grid("/path/to/Kurucz2003all/")
filters = load_filters(["/path/to/filters/GAIA/G.dat", "/path/to/filters/2MASS/J.dat",])
result = run_forward(teff=5777, logg=4.44, meta=0.0, R=6.957e10, d=3.086e19, grid=grid, filters=filters, mag_system="Vega")
print(result.magnitudes)
Inverse Modeling Example
from sed_model import run_inverse
posterior = run_inverse(obs_magnitudes=[5.03, 4.17], obs_uncertainties=[0.01, 0.02], filter_names=["G", "J"], R=6.957e10, d=3.086e19, grid=grid, filters=filters, n_walkers=32, n_steps=1000, n_burn=300, seed=42)
posterior.print_summary()
Integration with SED_Tools
This package is designed to function seamlessly with SED_Tools, which facilitates the acquisition and standardization of filter downloads, alongside grid construction and SED generation. By positioning SED_Model directly downstream, users can derive synthetic magnitudes and perform stellar parameter inference efficiently, enhancing the workflow:
SED_Tools -> build/download SED grids and filters
SED_Model -> generate synthetic magnitudes and infer stellar parameters
SED_Model stands as a comprehensive solution for astronomers and astrophysicists aiming to derive accurate stellar parameters and generate synthetic observational data, thus contributing significantly to the field of stellar astrophysics.
No comments yet.
Sign in to be the first to comment.