Grok¶
Grok estimates stellar parameters and projected rotational velocity (v sin i) from high-resolution APOGEE spectra using grid-based fitting. It operates on rest-frame coadded APOGEE spectra.
What it does¶
Grok determines:
Effective temperature (
teff)Surface gravity (
logg)Overall metallicity (
m_h)Microturbulent velocity (
v_micro)Projected rotational velocity (
v_sini)Carbon abundance (
c_m) and nitrogen abundance (n_m), when not using a subset grid
Results are provided at three levels of refinement: coarse grid search, grid-slice interpolation, and quadratic interpolation along marginalized chi-squared profiles.
How it works¶
Grid loading: A pre-computed grid of synthetic APOGEE spectra is loaded from an HDF5 file. The grid spans a multi-dimensional parameter space (Teff, logg, [M/H], v_micro, v_sini, and optionally [C/M] and [N/M]). By default, a subset grid is used with [C/M] = [N/M] = 0 and v_micro = 1.0 km/s.
Rotational broadening: The grid is convolved with rotational broadening kernels for a sequence of v_sini values (default: 0, 5, 7.5, 10, 20, 30, 50, 75, 100 km/s) using a limb-darkening coefficient of 0.6.
Error inflation: Flux uncertainties are inflated around significant skylines and spikes, and bad pixels are masked. This preprocessing step is similar to what ASPCAP applies.
NMF-assisted continuum: By default, the NMF rectified model flux from the NMF Rectify pipeline is used to assist in continuum determination.
Coarse grid search: The best-matching grid node is found by evaluating chi-squared at grid points using a hierarchical refinement strategy (default: 3 refinement levels). The continuum is estimated as the ratio of the observed to model flux at each grid point.
Refined estimates: Two additional estimates are produced:
Slice interpolation (
slice_*): For each parameter, the chi-squared profile is extracted along a 1D slice through the best grid node, and a quadratic is fit to the three points nearest the minimum.Quadratic marginalization (
quad_*): For each parameter, the chi-squared is minimized over all other dimensions, and a quadratic is fit to the resulting 1D profile.
Julia backend: The core grid operations (loading, convolution, node search) are implemented in Julia via
juliacallfor performance.
Output fields¶
Field |
Description |
|---|---|
|
Teff from the coarse grid search (K) |
|
log(g) from the coarse grid search |
|
[M/H] from the coarse grid search |
|
Microturbulence from the coarse grid search (km/s) |
|
v sin i from the coarse grid search (km/s) |
|
Chi-squared at the best coarse grid node |
|
Grid node values at the best-fit position |
|
Quadratic-interpolated values from 1D slices through the best node |
|
Quadratic-interpolated values from marginalized chi-squared profiles |
Key caveats¶
Grok requires Julia and the
juliacallPython package. The Julia code is loaded at runtime from theGrok.jlfile in the pipeline directory.The default subset grid fixes [C/M] = [N/M] = 0 and v_micro = 1.0 km/s. If you need carbon, nitrogen, or microturbulence as free parameters, set
use_subset=False.The grid has finite boundaries. Parameters at or near grid edges may be unreliable.
The
coarse_*fields report the nearest grid node; theslice_*andquad_*fields provide interpolated values that may lie between grid nodes.Results depend on the quality of the NMF continuum rectification when
use_nmf_flux=True(the default). Poor NMF fits can propagate into biased stellar parameters.The v_sini measurement is discretized to the set of broadening values provided. The quadratic interpolation between these values provides a finer estimate but is still limited by the spacing of the broadening grid.
A separate
measure_vsinitask is available that uses a CLAM-based approach to estimate v_sini independently.