Installation¶
brutus needs Python 3.10 or later on Linux or macOS. It installs from PyPI as astro-brutus:
pip install astro-brutus
To get the latest code from GitHub instead:
pip install git+https://github.com/joshspeagle/brutus.git
To change the code, follow Contributing.
pip installs the dependencies: numpy, scipy, matplotlib, h5py, healpy, astropy, numba, pooch and tqdm.
Windows
healpy, which brutus uses for the 3D dust maps, does not run on native Windows. Use the Windows Subsystem for Linux and install brutus there.
Model data¶
brutus fits stars against stellar models that ship separately from the code. Download them once: the fetch_* functions in brutus.data store each file in your user cache directory, or in $ASTRO_BRUTUS_DATA_DIR if you set it, and check its checksum.
Function |
File |
Size |
Needed for |
|---|---|---|---|
|
|
780 MB |
Fitting individual stars |
|
|
13 MB |
Empirical Pan-STARRS models (optional) |
|
|
< 1 kB |
Photometric calibration (recommended) |
|
|
2.2 GB |
Dust-map priors on extinction (optional) |
|
|
264 MB |
Star clusters and populations |
|
|
1.1 GB |
Individual stars off the grid |
|
|
0.2 MB |
Synthetic photometry for the two rows above |
The first EEPTracks load writes a cache of about 0.13 GB next to the track file. All the files and the cache take about 4.5 GB.
The files are also in the astro-brutus collection of the Harvard Dataverse, for a manual download.
To fit individual stars, download the grid and the offsets:
from brutus.data import fetch_grids, fetch_offsets
grid_file = fetch_grids(grid="mist_v9")
offsets_file = fetch_offsets(grid="mist_v9")
Each function returns the path of a link to the cached file, made in the current directory (or in target_dir). Where the file system cannot make links, it copies the file there instead.
Check the installation¶
import brutus
from brutus.analysis import BruteForce
print(brutus.__version__)
Next, fit a first star with the Quickstart.