hispecdrp.primitives.blaze_correction.blaze_correction_primitive
Functions
|
Return a slice covering the longest run of True values in |
|
Apply blaze correction to science spectrum and propagate errors for a single order. |
|
Apply blaze correction to science spectrum and propagate errors for all orders, then add to output model. |
|
Divide fiberflat blaze (and its uncertainty) by an analytic lamp spectrum. |
|
Estimate blaze using weighted cubic lsq smoothing spline. |
|
Collect smoothed blaze function (not normalized) for each order and return in 2D array |
|
Analytic lamp SED matching simulated fiberflats (energy density). |
|
Normalize blaze array across orders using a CubicSpline fit to wavelength/blaze peak. |
Classes
|
- class BlazeCorrectionPrimitive(dataset=None, config=None, context=None, log_config=None, parent=None, **kwargs)[source]
Bases:
BasePrimitive- get_output_model(input_model, **kwargs)[source]
- divide_out_lamp_spectrum(blaze_array, blaze_err_array, wavelengths, order_vec, do_orders, *, temperature_k=1000.0)[source]
Divide fiberflat blaze (and its uncertainty) by an analytic lamp spectrum.
Per-order lamp shapes are applied directly (no median renormalization) so the subsequent per-order max-normalization step preserves the correct instrument-blaze shape after dividing out BB×blaze fiberflats.
- lamp_spectrum_shape(wave_um, *, temperature_k=1000.0)[source]
Analytic lamp SED matching simulated fiberflats (energy density).
Uses the same blackbody construction as
create_dummy_fiberflat_rate_files():BlackBodyradiance per Å, then ×1e4 to per-µm energy density. Only the relative shape is used when dividing the fiberflat.