polynomial_templates¶
- grizli.utils.polynomial_templates(wave, ref_wave=10000.0, order=0, line=False)[source]¶
Generate polynomial templates based on the input parameters.
If
line
is True, the method generates line templates by applying a sign to the polynomial. Otherwise, it generates polynomial templates by raising the wavelength ratio to the power of the polynomial order.Each template is stored in the returned dictionary with a key in the format “poly {i}”, where i is the polynomial order.
- Parameters
- wavearray-like
The wavelength array.
- ref_wavefloat, optional
The reference wavelength. Default is 1.0e4.
- orderint, optional
The order of the polynomial. Default is 0.
- linebool, optional
Whether to generate line templates. Default is False.
- Returns
- temp: OrderedDict
A dictionary of SpectrumTemplate objects representing the polynomial templates.