kinextract.resolution_mismatch_sigma_A

kinextract.resolution_mismatch_sigma_A(data_fwhm_A: float, template_fwhm_A: float, atol: float = 1e-06) tuple[float, str][source]

Compute the Gaussian kernel needed to remove a data/template LSF mismatch.

Following the standard convolution-matching convention (e.g. Cappellari 2017, pPXF): if the two instrumental line-spread functions (LSFs) have different Gaussian FWHM, the sharper (narrower) one must be convolved with an additional Gaussian kernel of width sigma_diff = sqrt(sigma_broad**2 - sigma_narrow**2) (quadrature subtraction) to bring it down to the coarser resolution – you cannot sharpen the coarser side, only degrade the sharper one, so the fit is always carried out at the worse of the two resolutions.

Parameters:
  • data_fwhm_A (float) – Instrumental LSF FWHM of the galaxy spectrum, in Angstrom, in the same rest-frame wavelength units used for the fit (i.e. already deredshifted if it was measured in the observed frame – see FitConfig.data_fwhm_frame).

  • template_fwhm_A (float) – Instrumental LSF FWHM of the stellar template library, in Angstrom, in the template’s native (rest-frame) wavelength units.

  • atol (float, optional) – Absolute tolerance (Angstrom, in sigma units) below which the two resolutions are treated as already matched and no convolution is applied.

Returns:

  • sigma_diff_A (float) – The Gaussian sigma (Angstrom) of the kernel to convolve with the sharper spectrum. Zero if the two are already matched.

  • direction (str) – "convolve_templates" if the templates are sharper and must be degraded to match the data; "convolve_data" if the data is sharper and must be degraded to match the templates (rarer, but supported since which side is sharper depends on the specific instrument/library pairing and should not be assumed); "none" if the two already match to within atol.

Raises:

ValueError – If either FWHM is not a finite positive number.