Et tu, Brute?
brutus is a Pure Python package for "brute force" Bayesian inference to derive distances, reddenings, and stellar properties from photometry. The package is designed to be highly modular and user-friendly, with comprehensive support for modeling individual stars, star clusters, and 3-D dust mapping.
Comprehensive documentation can be found at brutus.readthedocs.io.
Please contact Josh Speagle (j.speagle@utoronto.ca) with any questions.
The most recent stable release can be installed via pip by running
pip install astro-brutus🌟 Individual Star Modeling: Fit distances, reddenings, and stellar properties for individual stars using Bayesian inference (with either pre-computed stellar grids or evolutionary mass tracks)
🌟 Cluster Analysis: Model stellar clusters with consistent ages, metallicities, and distances (with isochrones)
🌟 3D Dust Mapping: Integrate with 3D dust maps and model extinction along lines of sight
- Python: 3.8 or higher
- Operating System: Linux, macOS, or Windows with WSL (see Windows note below)
For most users, install the most recent stable release from PyPI:
pip install astro-brutusFor development or to get the latest features:
git clone https://github.com/joshspeagle/brutus.git
cd brutus
pip install -e ".[dev]"healpy dependency (required for interacting with dust maps), brutus does not work reliably on native Windows. Windows users should install and run brutus in WSL (Windows Subsystem for Linux).
If you use conda, you can install from conda-forge:
conda install -c conda-forge astro-brutusCore dependencies that will be automatically installed:
numpy(≥1.19) - Numerical computingscipy(≥1.6) - Scientific computingmatplotlib(≥3.3) - Plottingh5py(≥3.0) - HDF5 file supporthealpy(≥1.14) - HEALPix utilities for incorporating dust mapsnumba(≥0.53) - Just-in-time compilation for performancepooch(≥1.4) - Data downloading and managementtqdm(≥4.50) - Progress bars and live tracking
Brutus requires stellar evolution models and other data files to function. These can be downloaded automatically using built-in utilities:
from brutus import fetch_grids, fetch_isos, fetch_dustmaps
# Download MIST stellar evolution grids
fetch_grids()
# Download MIST isochrones
fetch_isos()
# Download 3D dust maps
fetch_dustmaps()Alternately, you can download them manually from the Harvard Dataverse.
We welcome contributions! Please see the contribution guide for guidelines.
git clone https://github.com/joshspeagle/brutus.git
cd brutus
pip install -e ".[dev]"# Basic tests
pytest
# With coverage
pytest --cov=brutusThis project is licensed under the MIT License - see the LICENSE file for details.
- Author: Joshua S. Speagle
- Email: j.speagle@utoronto.ca
- GitHub: https://github.com/joshspeagle/brutus
- Issues: https://github.com/joshspeagle/brutus/issues
brutus by default uses MIST stellar evolution models and Bayestar dust maps via the [https://dustmaps.readthedocs.io/en/latest/](dustmaps package). We thank the developers of these initiatives and codebases for making their data and/or code publicly available.
