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

Quick fix for FWHM bug #31

Merged
merged 3 commits into from
Apr 1, 2019

Conversation

AnthonyHorton
Copy link
Member

@AnthonyHorton AnthonyHorton commented Apr 1, 2019

This is a quick fix for a bug that can sometimes causes a tabulated data optical filter to fail to calculate its FWHM.

The cause of the problem was that the peak transmission value calculated by maximising the linearly interpolated transmission was slightly lower than the maximum transmission value in the tabulated data. For tabulated data filters the latter was being used to find wavelengths that bracketed the half maximum points, but then the peak value was being recalculated using the former method, which sometimes resulted in the half maximum points being outside the brackets. This quick fix avoids the problem by not recalculating the peak transmission value for tabulated data filters, and simply uses the maximum value from the tabulated data instead.

A better fix would also stop using solvers to find the half maximum points for the tabulated filters too, as a simple linear interpolation would be more robust and efficient in their case.

@AnthonyHorton AnthonyHorton merged commit 3125eb0 into AstroHuntsman:develop Apr 1, 2019
@AnthonyHorton AnthonyHorton deleted the fix_fwhm_bug branch April 1, 2019 04:07
@coveralls
Copy link

Coverage Status

Coverage remained the same at 90.506% when pulling 56e3f2f on AnthonyHorton:fix_fwhm_bug into 6e77606 on AstroHuntsman:develop.

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

Successfully merging this pull request may close these issues.

4 participants