psmd-iberutaru / Lezargus

The accompanying data software package to the IRTF SPECTRE Spectrograph.
MIT License
0 stars 0 forks source link

Convolution assumes static kernel, dynamic kernel desired? #19

Open psmd-iberutaru opened 5 months ago

psmd-iberutaru commented 5 months ago

The current method of the spectral resolution convolution kernel assumes that there is a single convolution kernel which does not vary with wavelength. This assumes that the spectral resolution is the same across the entire spectrum. This is not actually true and is a source of error. The convolution kernel is dependent on the spectral resolutions which are dependent on wavelength, so the kernel should also vary with wavelength.

However, currently known methods of convolution all assume a static kernel, one that does not vary over the convolution itself. A total refactor of the current convolution methods may be needed to implement dynamic kernel creation and convolution with dynamic kernels.

psmd-iberutaru commented 5 months ago

When fixed, the updated method should be properly propagated to lezargus.simulator.target.TargetSimulator.apply_atmosphere() and the functionality that converts the atmospheric generator spectrum to one more useful for applying it to the target.

psmd-iberutaru commented 5 months ago

JWST probably has a solution to this due to MIRI; check their source code of the JWST reduction. https://github.com/spacetelescope/jwst