Open PatrickOgle opened 1 year ago
This works well, and could form the basis of the algorithm: center = trace_r.guess spec2d_rectified = 1.0 *spec2d for col in range(ncols): shift = center - trace_r[col] shifted_col = ndimage.interpolation.shift(spec2d[:,col], shift, order=2) spec2d_rectified[:,col] = shifted_col
Use spectral trace object to rectify a 2D spectrum by shift-interpolating columns in the spatial direction. This doesn't require a wavelength solution. This simplest case assumes no mixing of spatial and spectral dimensions.