-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat: add inpaint-mode for lst binner #907
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.
Looking pretty good. Some minor feedback about default modes and assumptions, but I think this is close.
hera_cal/lstbin_simple.py
Outdated
mode. In this case, either choice is bad: to include them in the average is bad | ||
because even though they may have been actually in-painted, whatever value they have | ||
is clearly triggering the sigma-clipper and is therefore an outlier. On the other | ||
hand, to ignore them is bad because the point of in-painting mode is to get | ||
smoother spectra, and this negates that. So, it's best just to not do sigma-clipping | ||
in inpainted mode. |
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.
Can there be a mode where inpainted data cannot get sigma-clipped but non-inpainted data can?
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.
Sure! I'll add that.
Also, what do you want to do about tests failing? |
hera_cal/lstbin_simple.py
Outdated
return data, flags | ||
|
||
|
||
def get_lst_mad( |
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 does both med and mad, so I feel like both should be in the name.
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.
Got it. Fixed that up.
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 a few tiny changes, but otherwise good to go! Thanks for this @steven-murray!
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #907 +/- ##
==========================================
+ Coverage 97.17% 97.19% +0.01%
==========================================
Files 23 23
Lines 10282 10429 +147
==========================================
+ Hits 9992 10136 +144
- Misses 290 293 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
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 looks good to me! Nice work @steven-murray
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 saw there's one minor test that's failing. Assuming it's no big deal to fix, I approve.
and some pep8
also pep8
This adds an "inpaint" mode for the LST-binner. In this mode, flagged data is assumed to have been in-painted to preserve spectral smoothness.