-
Notifications
You must be signed in to change notification settings - Fork 104
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
KCWI scattered light #1661
KCWI scattered light #1661
Conversation
# Conflicts: # pypeit/core/datacube.py
Codecov Report
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. @@ Coverage Diff @@
## develop #1661 +/- ##
===========================================
+ Coverage 41.01% 41.07% +0.06%
===========================================
Files 189 189
Lines 43471 43583 +112
===========================================
+ Hits 17829 17903 +74
- Misses 25642 25680 +38
|
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.
A few minor comments from me, and two questions:
- Can you add a description of this approach to the
keck_kcwi.rst
doc? - Can we save the scattered light image somewhere? In either or both of the
Flat
calilbration frame and thespec2d
files?
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.
Very minor comments. Thanks!
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.
Thanks @jhennawi and @kbwestfall - I've addressed your comments.
In the process, I have also merged in in PR #1678 to take advantage of the new way to document changes.
Sorry @kbwestfall, I forgot to address your other questions...
Yes, I will add this to Keck/KCWI docs.
I think this is not a good idea for the moment. I am working on a parameterised model that would need to store the model parameters, rather than an image (together with a routine that can generate the image from the model parameters). So, I'm tempted to wait until the next round of KCWI scattered light removal to incorporate this. |
On saving the scattered light image, I'm fine with putting this off, but I wanted to advocate for saving the full image. In similar situations I also used to be of the opinion that it's better to save the model parameters and provide a script if people want to reconstruct the model. But I've come around to the opinion that this presents a barrier (albeit small) to people being able to assess the results. Disk space is cheap and, IMO, enabling people to quickly open the file with astropy and view it with matplotlib is worth the cost of a larger output file. |
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.
Approving!
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.
Approved. Thanks!
This PR includes the functionality to generate a (spectrograph dependent) scattered light model, and subtract this light from the input image. The scattered light should be removed before correcting for spatial and spectral illumination, so it has to be included in the rawimage class. Here is an example for the KCWI correction. This is based on the left, right, and central parts of the detector (i.e. the not illuminated parts of the detector). This is a pixelflat.