hispecdrp.primitives.trace_fitting.traceprof_moments
Trace-profile moments for spectroperfection extraction.
Spatial profile (0th/2nd spatial moment) comes from a fiberflat rate map.
Iso-λ shear and spectral 2nd moment come from LFC spots: each comb peak is a
tilted 2-D PSF whose covariance encodes ∂row/∂col and the line-spread
width along the dispersion axis.
Functions
|
|
Write shear / σ_spec (LFC) and σ_spat (fiberflat) into |
|
|
PCHIP-interpolate finite spot samples onto ``0 . |
|
Per-spectral-row spatial Gaussian σ from a fiberflat rate map. |
|
Measure LFC spot moments along one order's trace. |
|
Flux-weighted 1st/2nd moments of a 2-D window about |
- fill_traceprof_spectroperfection_moments(traceprof, *, fiberflat_rate, lfc_rate, tracepos, spectrograph, fiber, orders=None, extraction_aperture=8.0, half_win=6, expected_xy_by_order=None)[source]
Write shear / σ_spec (LFC) and σ_spat (fiberflat) into
traceprof.PROF_FIBis left unchanged (fiberflat image). Moment HDUs are(n_orders, n_pix)on the same spectral-row grid asTracePos.
- interpolate_moments_to_pixels(spot_rows, values, n_pix)[source]
PCHIP-interpolate finite spot samples onto
0 .. n_pix-1.
- measure_fiberflat_spatial_sigma(rate, trace_y, *, extraction_aperture=8.0)[source]
Per-spectral-row spatial Gaussian σ from a fiberflat rate map.
- measure_lfc_spot_moments_along_trace(rate, trace_y, *, extraction_aperture=8.0, half_win=6, min_prominence_frac=0.05, min_separation_pix=8, expected_xy=None)[source]
Measure LFC spot moments along one order’s trace.
If
expected_xyis given (deposit(row, col)pairs), those centers are used. Otherwise peaks are found on the aperture-summed spectral profile.
- spot_window_moments(rate, row, col, *, half_win=6)[source]
Flux-weighted 1st/2nd moments of a 2-D window about
(row, col).Oriented detector: spectral axis is
row, cross-dispersion iscol. Shear iscov(row, col) / var(col)=∂row/∂colof the iso-λ ridge.