desihub / specter

A toolkit for simulating multi-object spectrographs
Other
8 stars 7 forks source link

psf.xy edge effects #6

Closed sbailey closed 11 years ago

sbailey commented 11 years ago

psf.x(), psf.y() use numpy.interp which defaults to the boundary values when extrapolating. This creates problems when projecting a spot whose centroid is off the edge of the CCD : it is placed as if the centroid was exactly at the edge. No good.

Easy to fix, but the trick is to fix it in a way which doesn't hurt the performance of standard interpolation.

sbailey commented 11 years ago

Fixed within xypix() : if requested wavelength is out of the range for this ccd, return 0-length slices and image so they won't contribute to a projection.

PSF files need to include some extra xy range off of the CCD to allow edges of PSFs to extend back onto the CCD, but that is an input file issue not a code issue.

psf.x() and psf.y() will still report nonsense if requested for a crazy wavelength. Seems better than raising an irritating exception. We'll see.