The "Spectro-Perfectionism" technique described by Bolton & Schlagel (2010; https://iopscience.iop.org/article/10.1086/651008/meta) provides a way to much more precisely extract 1D spectra from 2D data. It is correct for any 2D PSF, preserves the full resolution of the 2D spectrograph, and provides statistically independent extracted samples. It comes at a cost of being much more computationally expensive than simpler techniques, but there are a variety of ways to make that tractable (e.g. using GPUs).
An example of a python implementation exists within the MINERVA pipeline: https://iopscience.iop.org/article/10.1088/1538-3873/ab4103/pdf. The code is available at: https://github.com/MinervaCollaboration/minerva-pipeline.
The "Spectro-Perfectionism" technique described by Bolton & Schlagel (2010; https://iopscience.iop.org/article/10.1086/651008/meta) provides a way to much more precisely extract 1D spectra from 2D data. It is correct for any 2D PSF, preserves the full resolution of the 2D spectrograph, and provides statistically independent extracted samples. It comes at a cost of being much more computationally expensive than simpler techniques, but there are a variety of ways to make that tractable (e.g. using GPUs).
An example of a python implementation exists within the MINERVA pipeline: https://iopscience.iop.org/article/10.1088/1538-3873/ab4103/pdf. The code is available at: https://github.com/MinervaCollaboration/minerva-pipeline.