MISTBolometricCorrectionGrid#
- class cogsworth.obs.mist.MISTBolometricCorrectionGrid(bands: tuple[str] = ('G', 'BP', 'RP'), cache_dir: Path = PosixPath('/home/docs/.MIST_bc_grids'), rebuild: bool = False)[source]#
Bases:
objectDownload, cache, and ingest MIST bolometric correction grids.
- Parameters:
- bandstuple[str]
tuple of photometric bands to include (e.g. (“LSST_u”, “BP”, “G”, “RP”))
- cache_dir
directory where tarballs, extracted files, and HDF5s are stored (default: ~/.MIST_bc_grids)
Attributes Summary
Methods Summary
build_hdf5(filter_set)Build (or rebuild) a single HDF5 file for a filter set.
download_filter_set(filter_set)Download the MIST BC tarball for a given filter set (e.g.
extract_filter_set(filter_set)Extract a downloaded tarball into a subdirectory of cache_dir.
interp(teff, logg, feh, av[, bands, ...])Interpolate BCs at (Teff, logg, feh, Av) in that order.
load_hdf5(filter_set)Load a previously-built HDF5 BC grid.
read_filter_set(filter_set)Read all BC files for a filter set and concatenate into one DataFrame.
Attributes Documentation
Methods Documentation
- download_filter_set(filter_set: str) Path[source]#
Download the MIST BC tarball for a given filter set (e.g. ‘LSST’).
- extract_filter_set(filter_set: str) Path[source]#
Extract a downloaded tarball into a subdirectory of cache_dir.
- interp(teff: float | ndarray, logg: float | ndarray, feh: float | ndarray, av: float | ndarray, bands: tuple[str, ...] | None = None, silence_bounds_warning: bool = False) Series | DataFrame[source]#
Interpolate BCs at (Teff, logg, feh, Av) in that order.
- Returns:
- Series if all inputs are scalar
- DataFrame if any input is array-like (one row per broadcasted point)