brutus¶
Distances, extinctions and stellar properties from photometry and astrometry, by evaluating every model on a grid.
What brutus does¶
Fit the distance, extinction and stellar properties of thousands of stars from their photometry and parallaxes, with Galactic and dust-map priors.
Fit one age, metallicity, distance and extinction to a coeval population, with binaries and outliers.
Combine the distance-extinction posteriors of many stars to measure the dust along a line of sight.
How it works¶
Evaluate the likelihood of the data for every model in a grid of stellar models.
For each model, fit the distance and extinction that match the data best.
Weight each model by its priors: Galactic structure, dust maps, parallax and initial mass function.
The posterior is the weighted mixture of all models. No sampler, no convergence checks.
How brutus works explains each step.
A first fit¶
from brutus.analysis import BruteForce
from brutus.core import StarGrid
from brutus.data import fetch_grids, load_models
from brutus.utils import inv_magnitude
models, labels, _ = load_models(fetch_grids(grid="mist_v9"), filters=filters)
fitter = BruteForce(StarGrid(models, labels))
flux, flux_err = inv_magnitude(mag, mag_err) # brutus fits fluxes, not magnitudes
fitter.fit(
data=flux, data_err=flux_err, data_mask=mask, data_labels=ids,
parallax=parallax, parallax_err=parallax_err, # in mas
data_coords=coords, # Galactic (l, b) in degrees
save_file="results.h5",
)
The Quickstart runs this end to end and reads the results.
Citing brutus¶
If you use brutus, please cite Speagle et al. (2025), arXiv:2503.02227.