Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 thexcor
andxcor_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.