A working fork of speedyfit with compatibility fixes and extended plotting for binary SED fitting.
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."
- Original repository: https://github.com/vosjo/speedyfit
- Original documentation: https://speedyfit.readthedocs.io/en/latest/index.html
- Original version this fork is based on: v0.2.4
All credit for the core fitting engine, photometry query, reddening laws, model interpolation, and MCMC implementation belongs to the original author.
| 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. |
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)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 |
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 repositorySee 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 binaryThe 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.