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

PSF subtraction step should propagate DQ and Error arrays properly. #297

Open
ell-bogat opened this issue Feb 10, 2025 · 1 comment
Open

Comments

@ell-bogat
Copy link
Contributor

Is your feature request related to a problem? Please describe.
The PSF subtraction step currently does not propagate errors at all. It also replaces all pixels with a DQ value > 0 with nans and then flags the nan pixels in the output dataset, however the presence of nans in the reference images causes... interesting results.

Here is the result for an idealized psf subtraction with no dqs/nans present and a roll angle of 45 degrees. The bottom left panel shows the output image, which matches the expected result perfectly:

Image

And here is the result with a stripe of nans in the science image, causing a major offset in the output image:

Image

And this is the result with a stripe of nans in the science image and a stripe of nans in the reference image. You can see the stripe of nans in the reference image causes all sorts of artifacts:

Image

Describe the solution you'd like
We should make sure PSF subtraction step propagates errors (I think there's a way to pass them to pyKLIP) and test that it works correctly.

We should determine what the expected behavior is for nan pixels in the reference images (or require that no nans/dq flags are present) and make sure we're getting the right result.

Additional context
None.

@ell-bogat
Copy link
Contributor Author

@semaphoreP , above is a summary of the effect of dq flags in the science/reference datasets. Please let me know if you have any thoughts!

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

No branches or pull requests

1 participant