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

Fix 2D Wavelength Fitting #118

Open
wants to merge 13 commits into
base: dev
Choose a base branch
from

Conversation

joshwalawender
Copy link
Contributor

Several significant changes to the Wavelength code were made:

First, the function to determine the estimated offset between rows of pixels was changed to use the new find_shift method rather than the xcor and xcor_peak methods. This new method is similar, but works out to be about 2x faster when timed using the %timeit tool in ipython.

Second, that shift determination was constrained to be within 3 pixels of the neighboring line, rather than within 30 pixels of the starting line. This ensures a much more continuous wavelength solution in the Y direction.

Third, when fitting Chebyshev polynomials to the wavelength solution for each line, an extra step is added (the smooth_solution method) to median filter each Chebyshev coefficient in the Y direction to limit the changes in wavelength solution from pixel line to adjacent pixel line.

This appears to have fixed the problem in #115, though further testing to ensure that it works in all cases is still pending.

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

Successfully merging this pull request may close these issues.

1 participant