Skip to content

Repository files navigation

speedyfit — Troubleshooted Fork

A working fork of speedyfit with compatibility fixes and extended plotting for binary SED fitting.


Credits & Original Authors

speedyfit was created and is maintained by Joris Vos (joris.vos@uv.cl).

"speedyfit is a Python package to fit the photometric spectral energy distribution of stars using a Markov Chain Monte Carlo approach."

All credit for the core fitting engine, photometry query, reddening laws, model interpolation, and MCMC implementation belongs to the original author.


What This Fork Changes

plotting.py

Change Description
Labelled binary components plot_fit now draws separate dashed curves for the WD (green) and companion (blue) model spectra, each with a legend label. An optional third component (disc/blackbody, magenta) is also plotted if teff3 is present in the fit parameters.
Spectrum export After each fit plot, four plain-text files are written to the working directory for downstream analysis: wd_model_spectrum.txt, companion_model_spectrum.txt, observations.txt, model_fluxes.txt.
Parameter debug print plot_fit prints the full parameter dictionary to stdout for quick verification without opening the results file.

Known Issues / Remaining Deprecation Warnings

The normed=True argument in plot_distribution and plot_distribution_2d was removed in matplotlib 3.x. These functions are not called in the main fitting workflow, but will raise a TypeError if invoked directly. Fix:

# old
pl.hist(d, 50, normed=True)
# fix
pl.hist(d, 50, density=True)

Environment

Tested with a conda environment called sed_fitting (Python 3.8).

Package Version
Python 3.8
matplotlib 3.7.5
astropy 5.2.2
emcee 3.1.6
corner 2.2.1

Recreating the environment

conda create -n sed_fitting python=3.8
conda activate sed_fitting
pip install speedyfit==0.2.4
# Then replace the site-packages/speedyfit/ folder with this repository

Usage

See the original documentation for full usage: https://speedyfit.readthedocs.io/en/latest/index.html

conda activate sed_fitting
# single-star fit
speedyfit mysetup.yaml -star single
# binary fit
speedyfit mysetup.yaml -star binary

License

The original speedyfit is released under the GNU General Public License v3 (GPLv3). This fork is a derivative work and is distributed under the same GPLv3 license. See the original license for full terms.

About

Troubleshooted fork of speedyfit (v0.2.4) by Joris Vos — binary SED fitting with extended plotting

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages