-
Notifications
You must be signed in to change notification settings - Fork 28
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
Update PSF fitting defaults. #936
Conversation
for more information, see https://pre-commit.ci
…ncal into psf-default-update
Codecov ReportAll modified lines are covered by tests ✅
... and 1 file with indirect coverage changes 📢 Thoughts on this report? Let us know!. |
romancal/lib/psf.py
Outdated
central_wavelength_meters = ( | ||
filter_central_wavelengths[f"WFI_Filter_{filt}_Center"] * 1e-6 * u.m | ||
) | ||
(filter_central_wavelengths[f"WFI_Filter_{filt}_Center"] * 1e-6 * u.m) |
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.
Do you mean to remove this line entirely?
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 didn't mean to touch that at all. That was something the pre-commit hook did to my PR.
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.
Ah, I see what you mean. Yeah, I left that as an unused variable, and I thought precommit had just trying to reformat it but it in fact it got rid of the definition and it's now weird. I'll delete it.
This works for me.
If and when a PSF library is maintained as planned, the user won't see any penalty. Let's make sure that's still on the radar for @nden and @tddesjardins.
Sounds good. |
This PR is intended to improve the PSF fitting accuracy of romancal.
It makes two changes:
The second change doesn't have much in the way of knock-on effects. It turns out that the convolution over the pixel size done for even oversamplings isn't great, and picking an odd number just resolves this. See spacetelescope/webbpsf#754 .
The first change will make generating the PSF library ~10x more expensive. I think we should also consider reducing the number of PSFs evaluated on the grid to 4 from 16, which would buy back half of this; the PSF variation is less important than the monochromaticity in my experience. That would recover ~half of the performance loss. We eventually plan to store these as binary files rather than to compute them on the fly, which would allow us to do arbitrarily complicated things here.
With these two changes, plus an associated change to romanisim to correctly treat the orientation of the PSF, the ability to recover the positions of bright simulated stars in romanisim in F087 improves to 0.008 pix from something like 0.2 pix.
One thing we don't yet have is an IPC implementation in WebbPSF. This is in romanisim. We could investigate how important an effect that is on the remaining residuals, but 0.008 pix will meet spec for now.
Checklist
CHANGES.rst
under the corresponding subsection