-
Notifications
You must be signed in to change notification settings - Fork 15
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
nircam and miri SGD notebook error due to NANs #1
Comments
I would think in general we ought to try to avoid saturating the reference stars, right? But your code makes sense to work around if that does happen. Where exactly is this code - is it in the notebook or in one of the .py files? |
So I definitely think we should attempt to avoid saturating the reference stars. However, the code crashes if NANs are present, and so it's worth doing the check. Or making the code robust to NANs. The snippet of code I showed above are in both MIRI and NIRCAM SGD notebooks. In fact @kvangorkom does something similar in the miri_photon_noise_and_contrast example notebook under the section labeled Post Processing, where he replaces the NANs with the max. Not sure whether it should be the max, I believe Jason changes NANs to 0 in pyklip. |
Is the code actually crashing when NaNs are present, or is it simply giving the wrong answer? |
It crashes the call to analysis.klip_projection(), with the following error -
|
Hello,
I have been testing the MIRI SGD notebook and running into issues when generating the KLIP reference. This is related to uncorrected nan's in the SGD reference images, possibly due to saturation artifacts, that cause the code to crash.
Here's what is in the original code -
I modified it in the following manner -
This does result in the central PSF artifact not getting completely removed in the target-reference but that could be corrected by drawing a mask on the central 0.1-0.2 arcsec.
The text was updated successfully, but these errors were encountered: