sdss / mangadap

The MaNGA Data Analysis Pipeline
BSD 3-Clause "New" or "Revised" License
16 stars 9 forks source link

Dealing with regular wavelength spacing in templatelibrary.py #59

Closed khrrubin closed 5 years ago

khrrubin commented 5 years ago

In _process_library, ang_per_pix needs to have the same dimensions as self.hdu['SPECRES'].data. However, if regular=True in the line

ang_per_pix = numpy.array([angstroms_per_pixel(w, log=self.library['log10'], base=10., regular=self.library['in_vacuum'])....

then ang_per_pix ends up having dimensions of (1 x number of templates), which causes the next line to crash (i.e., pix_per_fwhm = numpy.ma.divide(self.hdu['WAVE'].data, self.hdu['SPECRES'].data * ang_per_pix)

kbwestfall commented 5 years ago

This should now be fixed by #67