-
Notifications
You must be signed in to change notification settings - Fork 1
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
Updates to fitting for faint traces. #35
base: same-block-cals
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just out of curiosity, was there a reason for the binning to be 25 pixels wide? what made you choose that width?
25 is small enough of step to sample the dispersion direction well, but large enough to boost the signal-to-noise be a factor of ~5. |
I've updated how we fit the width of the profile. It is much closer to how we fit the centroid now. We bin the data down by again a factor of 25, interpolating onto a common grid and then fit a simple polynomial + gaussian model. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this makes sense.
profile_sigmas.append(Legendre(best_fit, domain=domain)) | ||
return profile_sigmas | ||
|
||
# Group the data in bins of 25 columns (25 is big enough to increase the s/n by a factor of 5 but small enough |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:)
This PR updates our trace fitting algorithm to better deal with faint (read low signal-to-noise) traces. To fit the center, we take 25 pixel steps and fit the entire 25-pixel wide block using a match filter to get the trace center. We have also included error bars in the centroids estimated from this. These steps are fit to a Legendre polynomial to get initial coefficient guesses. We then fit the entire trace simultaneously (with a fixed width) to get the centers of the trace. Once we have the centers, we fix them and allow the width to vary. We include a background term that is a Legendre polynomial but the coefficients vary smoothly across the image.