Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rectify 2D spectrum #170

Open
PatrickOgle opened this issue Apr 11, 2023 · 1 comment
Open

Rectify 2D spectrum #170

PatrickOgle opened this issue Apr 11, 2023 · 1 comment

Comments

@PatrickOgle
Copy link

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.

@PatrickOgle
Copy link
Author

PatrickOgle commented Apr 11, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant