API Reference
mist_interpolator
- class minimint.mist_interpolator.Interpolator(filts, data_prefix=None, interp_mode='linear', mist_version='1.2', vvcrit=0.4)[source]
Bases:
object
- class minimint.mist_interpolator.TheoryInterpolator(prefix=None, interp_mode='linear', mist_version='1.2', vvcrit=0.4)[source]
Bases:
object- getLogAgeFromEEP(mass, eep, feh, afe=0.0, returnJac=False)[source]
Interpolate log-age as a function of EEP, mass, and composition.
- Parameters:
mass (float or array-like) – Stellar mass values.
eep (float or array-like) – EEP positions.
feh (float or array-like) – Metallicity [Fe/H] values.
afe (float or array-like) – Alpha enhancement [alpha/Fe] values.
returnJac (bool) – If True, also return an approximate derivative d(logage)/dEEP.
- minimint.mist_interpolator.download_and_prepare(filters=['DECam', 'GALEX', 'PanSTARRS', 'SDSSugriz', 'SkyMapper', 'UBVRIplus', 'WISE'], outp_prefix=None, tmp_prefix=None, vvcrit=0.4, mist_version='1.2', bc_only=False, feh_values=None, afe_values=None)[source]
Download MIST archives and prepare interpolation-ready data products.
- Parameters:
filters (tuple) – List of filter systems [‘DECam’,’GALEX’,…’]
outp_prefix (string (optional)) – Output directory for processed files
tmp_prefix (string (optional)) – Temporary directory for storing downloaded files
vvcrit (float) – The value of V/Vcrit for the isochrones. The default value is 0.4, but you can also use the value of 0
mist_version (str) – MIST version (“1.2” or “2.5”).
bc_only (bool) – If true, only download the bolometric corrections
feh_values (list (optional)) – List of [Fe/H] values to download. If None, uses defaults for version.
afe_values (list (optional)) – List of [alpha/Fe] values to download. Ignored for v1.2.
- minimint.mist_interpolator.get_bc_urls(filters, mist_version='1.2')[source]
Get bolometric-correction download URLs.
- Parameters:
filters (iterable of str) – Filter-system groups to download.
mist_version (str) – MIST version string (“1.2” or “2.5”).
- minimint.mist_interpolator.get_eep_urls(feh_values=None, afe_values=None, mist_version='1.2', vvcrit=0.4)[source]
Get EEP track download URLs.
- Parameters:
feh_values (iterable or None) – [Fe/H] values to include. If None, version defaults are used.
afe_values (iterable or None) – [alpha/Fe] values to include. If None, version defaults are used.
mist_version (str) – MIST version string (“1.2” or “2.5”).
vvcrit (float) – Rotation value used in URL naming.
- minimint.mist_interpolator.get_file(gridt)[source]
Return filename for a saved grid array by gridt key.
- minimint.mist_interpolator.grid1d_filler(arr)[source]
This takes a vector with gaps filled with nans. It then fills the internal gaps with linear interpolation Input is modified
- Parameters:
arr (np.ndarray) – Input 1D array modified in-place.
- minimint.mist_interpolator.grid3d_filler(ima)[source]
This fills nan gaps along one dimension in a 3d cube. I fill the gaps along mass dimension The array is modified
- Parameters:
ima (np.ndarray) – Input 3D array modified in-place.
- minimint.mist_interpolator.prepare(eep_prefix, bolom_prefix=None, outp_prefix=None, bc_only=False, filters=('DECam', 'GALEX', 'PanSTARRS', 'SDSSugriz', 'SkyMapper', 'UBVRIplus', 'WISE'), vvcrit=0.4, mist_version='1.2')[source]
Prepare local EEP/BC files into minimint interpolation grids.
- Parameters:
eep_prefix (string) – Path containing EEP folders/files to ingest.
bolom_prefix (string) – Path containing bolometric-correction files to ingest.
outp_prefix (string or None) – Output directory for prepared arrays.
bc_only (bool) – If True, prepare only bolometric-correction data.
filters (iterable of str) – Filter-system groups used for BC preparation.
vvcrit (float) – Rotation value used to select versioned output paths.
mist_version (str) – MIST version string (“1.2” or “2.5”).
Notes
Created files
Files written into
outp_prefixbyprepare():logage_grid.npy: Theory-grid log10(age) values on the prepared EEP grid.logteff_grid.npy: Theory-gridlog_Teffvalues on the prepared EEP grid.logg_grid.npy: Theory-gridlog_gvalues on the prepared EEP grid.logl_grid.npy: Theory-gridlog_Lvalues on the prepared EEP grid.phase_grid.npy: Integer evolutionary phase labels on the prepared EEP grid.valid_eep_max.npy: Per-grid-cell maximum valid EEP index used for validity checks.interp.npz: Metadata bundle withumass,ufeh,uafe,neep,grid_ndim,mist_version, andvvcrit.bolom_points.npy: BC interpolation coordinate matrix (axes used by BC tables).filt_<FILTER_NAME>.npy: One BC values array per filter in the prepared set.
If
bc_only=True, onlybolom_points.npyandfilt_<FILTER_NAME>.npyfiles are created.
bolom
- minimint.bolom.list_filters(path=None, mist_version='1.2', vvcrit=0.4)[source]
Return filter names available in prepared bolometric-correction data.
- Parameters:
path (str or None) – Directory to scan. If None, resolve from mist_version and vvcrit.
mist_version (str) – MIST version used when resolving the default path.
vvcrit (float) – Rotation value used when resolving the default path.
- minimint.bolom.prepare(iprefix, oprefix, filters=('SDSSugriz', 'SkyMapper', 'UBVRIplus', 'DECam', 'WISE', 'GALEX'))[source]
Read bolometric-correction tables and save compact .npy grids.
- Parameters:
iprefix (str) – Input directory containing raw BC table files.
oprefix (str) – Output directory where bolom_points.npy and filt_*.npy are saved.
filters (iterable of str) – Filter-system groups to read from the input directory.
utils
- minimint.utils.get_data_path()[source]
Return the base directory containing prepared minimint datasets.
- minimint.utils.get_data_path_for_grid(mist_version='1.2', vvcrit=0.4, create=True)[source]
Return a dataset path for a given MIST version and vvcrit.
- Parameters:
mist_version (str) – MIST version label.
vvcrit (float) – Rotation value used in the path naming convention.
create (bool) – If True, create the directory when missing.
- minimint.utils.normalize_mist_version(mist_version=None)[source]
Normalize mist_version string (for example v1.2 -> 1.2).
- minimint.utils.solve_steffen_t(y_m1, y_0, y_1, y_2, target_y)[source]
Find t in [0, 1] such that steffen_interp(…, t) == target_y.
- Parameters:
y_m1 (array-like) – Value at x=-1.
y_0 (array-like) – Value at x=0.
y_1 (array-like) – Value at x=1.
y_2 (array-like) – Value at x=2.
target_y (array-like) – Target interpolation value to invert for.