kinextract.getnlosvd_fast_from_b
- kinextract.getnlosvd_fast_from_b(st: FitState, b: ndarray) tuple[ndarray, ndarray][source]
Resample a trial LOSVD histogram onto the fine internal velocity grid.
Linearly interpolates the nl-bin LOSVD amplitude vector b (defined on st.xl) onto the finer grid st.vgrid0 using the indices/weights precomputed by precompute_losvd_interp, then rescales the result so its total sum matches the sum of the original histogram b (preserving total LOSVD normalization/flux under resampling). This is the fast per-evaluation step used inside the optimizer to turn trial LOSVD amplitudes into the fine-grid profile needed for convolution with the template matrix.
- Parameters:
- Returns:
facnew0 (ndarray, shape (nlosvd,)) – Velocity-to-pixel-shift conversion factors on the fine grid (passed through unchanged from st.facnew0, returned alongside the resampled LOSVD for convenience at the call site).
y2 (ndarray, shape (nlosvd,)) – LOSVD amplitudes b resampled onto the fine grid st.vgrid0 and renormalized to preserve the total sum of b.