Skip to content

segasai/minimint

Repository files navigation

Build Status Documentation Status Coverage StatusDOI

Minimint (MIni Mist INTerpolation)

This is a python package to perform interpolation of MIST (v1.2 and alpha-enriched v2.5) isochrones. It is simple, in the sense that it only does one thing - predict the stellar parameters ($\log g$, $T_{eff}$, $\log L$) and photometry in a given filter for a given mass, age and metallicity. It is also vectorized, so computing photometry for a large number of stars should not be too slow.

Author: Sergey Koposov (2020-2026) skoposov AT ed DOT ac DOT uk

Instructions

  • Install minimint. You can either pip install the released version or install from github. Currently the version supporting the MIST 2.5 isochrones is only available on github, but not yet through pypi.
pip install minimint
  • Download and prepare isochrone files
minimint.download_and_prepare()

That will download all the MIST files, and process the evolutionary tracks and bolometric corrections by creating the necessary files for the package.

minimint.download_and_prepare() by default creates bolometric corrections for these filters 'DECam', 'GALEX', 'PanSTARRS', 'SDSSugriz', 'SkyMapper','UBVRIplus', 'WISE' If you need additional filters, you can specify them using the filters parameter

minimint.download_and_prepare(filters=['JWST','WISE','DECam', 'GALEX', 'PanSTARRS', 'SDSSugriz', 'SkyMapper','UBVRIplus']) Check which filters are available on the MIST website http://waps.cfa.harvard.edu/MIST/model_grids.html

You can select MIST version with mist_version: minimint.download_and_prepare(mist_version='1.2')

minimint.download_and_prepare(mist_version='2.5')

For MIST 1.2 the downloading will take some time (20-30 min) and will use significant amount of disk space (10-30 Gb). Keep in mind that the whole 2.5 set of tracks will use ~ 100 GB of temporary disk space. The space used after install should be < 2GB.

If you want to put those processed isochrone files in a location different from the site-packages folder of minimint, you can use the outp_prefix parameter of download_and_prepare. You then will need to either specify the location each time when you construct the interpolators or with the MINIMINT_DATA_PATH environment variable. The files created at this stage can be copied to other machine, if you don't want to repeat the downloading/preparation steps.

You can prepare multiple rotation grids and select by vvcrit:

minimint.download_and_prepare(vvcrit=0.4)

minimint.download_and_prepare(vvcrit=0.0)

You can use these commands to just fetch a subset of the grid by specifying feh_values or afe_values arguments

If you are using the latest 1.0 version of minimint existing local data from older releases should be regenerated by rerunning download_and_prepare(...).

Manual Download + prepare()

If you already downloaded MIST archives manually, you can unpack them yourself and run only the preparation step:

You can also get the expected archive URLs directly from minimint:

import minimint

# Bolometric-correction URLs
bc_urls = minimint.get_bc_urls(['DECam', 'WISE'], mist_version='2.5')

# EEP track URLs
eep_urls = minimint.get_eep_urls(feh_values=[-1.0, -0.5, 0.0],
    afe_values=[0.0, 0.2, 0.4],    mist_version='2.5', vvcrit=0.4)

Download/unpack those URLs however you prefer, then run:

import minimint

# folder with unpacked EEP directories/files
eep_prefix = "/path/to/unpacked/eep_data"

# folder with unpacked BC table files (can be same as eep_prefix)
bolom_prefix = "/path/to/unpacked/bc_data"

minimint.prepare(
    eep_prefix,
    bolom_prefix=bolom_prefix,
    outp_prefix="/path/to/output",
    mist_version="2.5",   # or "1.2"
    vvcrit=0.4,
)

If you forgot to add a specific filter system, you can always add it later and use the bc_only flag of download_and_prepare()

Usage

In order to create an interpolator object for two filters (you can provide a list of any number of filters)

ii = minimint.Interpolator(['DECam_g','DECam_r'])

To select a specific prepared v1.2 rotation grid:

ii = minimint.Interpolator(['DECam_g','DECam_r'], vvcrit=0.0)

To select MIST version explicitly:

ii = minimint.Interpolator(['DECam_g','DECam_r'], mist_version='1.2')

ii = minimint.Interpolator(['DECam_g','DECam_r'], mist_version='2.5')

The interpolator is a callable, so you can call it on mass, log10(age), feh

ii(mass, logage, feh)

This returns a dictionary with photometry, logg, logteff and logl. mass, logage and feh could arrays. In this case the result will be dictionary of arrays.

You also can use the interpolator to find the maximum valid mass on the isochrone.

ii.getMaxMass(logage, feh)

Examples

See the notebook in the examples folder

Synthetic stellar populations

If you are interested in synthetic stellar populations you will need an implementation of the IMF. For this you may want to use https://github.com/keflavich/imf

Interpolation mode

Minimint supports two interpolation modes via interp_mode:

  • interp_mode='linear': more conservative and typically more robust on sparse/coarse grids.
  • interp_mode='cubic': smoother cubic interpolation, but it can be a bit 'wiggly' in the parts of HRD with very rapid changes (like the horizontal branch region)

Examples:

ii_lin = minimint.Interpolator(['DECam_g', 'DECam_r'], interp_mode='linear')
ii_cub = minimint.Interpolator(['DECam_g', 'DECam_r'], interp_mode='cubic')

Acknowledgement

If you are using this package please cite it through zenodo link https://doi.org/10.5281/zenodo.4002971 Also make sure that you acknowledge MIST isochrones https://waps.cfa.harvard.edu/MIST/

About

Simple MIST isochrone interpolation

Topics

Resources

Stars

Watchers

Forks

Packages