-
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: new per-night inpainting within lst_stack #989
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #989 +/- ##
==========================================
+ Coverage 97.20% 97.21% +0.01%
==========================================
Files 31 31
Lines 11204 11256 +52
==========================================
+ Hits 10891 10943 +52
Misses 313 313
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.
Just a few tiny documentation/comment/style suggestions, but otherwise good to go! Thanks @steven-murray !
max_convolved_flag_frac: float = 0.667, | ||
eigenval_cutoff: float = (0.01,), | ||
cache: dict | None = None, | ||
spws: list[slice] = (slice(0, None, None),), |
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 kwarg needs documentation.
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.
Done.
hera_cal/lst_stack/averaging.py
Outdated
) | stackf | ||
|
||
nf = stackf.shape[1] | ||
flaggy_flags = np.zeros_like(stackf, dtype=bool) |
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.
lol, what? Perhaps use a more descriptive variable 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.
Ahh yes. Result of brain freeze. Fixed.
): | ||
# Now we have all the per-night models. Next thing to do is to make sure we flag | ||
# anything where the flag gaps are too big. | ||
convolution_kernel = np.append( |
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'd clarify that this convolution is triangular with base width = 2* max_allowed_gap_size - 1.
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 added a docstring mentioning this.
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.
Looks good to me as well! Thanks @steven-murray!
Adds per-night inpainting to the LST-stack codebase. I refactored the existing code for the simultaneous inpainting so that there is more code re-use.