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 · May be fixed by #235
Open

Rectify 2D spectrum #170

PatrickOgle opened this issue Apr 11, 2023 · 1 comment · May be fixed by #235
Assignees

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

@hpparvi hpparvi self-assigned this Dec 10, 2024
@hpparvi hpparvi linked a pull request Dec 10, 2024 that will close this issue
@hpparvi hpparvi linked a pull request Dec 10, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants