pypeit / PypeIt

The Python Spectroscopic Data Reduction Pipeline
BSD 3-Clause "New" or "Revised" License
164 stars 106 forks source link

[Suggestion] Return a line spread function for each spectrum #1362

Open KevinMcK95 opened 2 years ago

KevinMcK95 commented 2 years ago

In my research, modelling the line spread function (LSF) of the data is important when I am degrading synthetic stellar spectra to the observed data quality to measure stellar parameters. Many spectral fitting codes keep the LSF as a free parameter and also assume that it is a constant-width Gaussian kernel across the spectrum, but it would be better if PypeI returned a well-measured LSF to remove this as a fitting variable.

For example, with DEIMOS, the LSF consists of a few key measurements:

  1. The FWHM seeing (at a particular wavelength), which goes as wavelength^(-1/5);
  2. The width of the slit, which truncates the wings of the seeing profile;
  3. The amount of additional smoothing as a function of wavelength as the light passes through the telescope (usually well-approximated by a quadratic that has a minimum near the chip gap).

The total LSF for DEIMOS data (as a function of wavelength) is then a truncated Gaussian from the seeing that is convolved with the smoothing Gaussian, which produces a shape that cannot be described by a single Gaussian (except in cases of exceptional seeing where the target's light entirely falls in the slit). From my research, measuring the seeing and smoothing can come from measurements of the stellar trace's width and from fitting arc and sky lines respectively. Since PypeIt is already measuring these, it should hopefully only be a few additional steps to return the measurements needed for a well-constrained LSF.

rcooke-ast commented 1 year ago

I've only just seen this suggestion, and it's a good idea... The following PR is not quite what you're after... but it is a step in the right direction... PR #1600