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

robust fitting is still not robust enough #45

Open
cylammarco opened this issue Jul 9, 2021 · 1 comment
Open

robust fitting is still not robust enough #45

cylammarco opened this issue Jul 9, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@cylammarco
Copy link
Collaborator

The two ends of the polynomial fit can run away (see only bottom plot):

figure_6_heatmap

from each pixel, 0 to 1000, it is showing the histogram of the distribution of the deviation of the wavelength solution from the median value at that pixel.

the spectrograph is only usable from 4020 A onwards (see top x-axis), meaning, we have some data off by less than 10A at the usable wavelength while SPRAT has a resoution of 9.2A. From 4400 to 8000 A, the deviation is less than 1A, which is better than 0.1 pixel i.e. robust fit is good for almost all of it, except it can go run-away at the extreme ends when they are unconstrained.

@cylammarco
Copy link
Collaborator Author

During the final peak/line fitting (after RANSAC) the polyfit is not constrained (e.g. by wavelength range) which can cause really weird solutions.

Should be straightforward using one of scipy's minimisation routines that allows parameter bounds.

@cylammarco cylammarco added this to the v0.4.0 milestone Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants