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

feat: new per-night inpainting within lst_stack #989

Merged
merged 5 commits into from
Feb 12, 2025

Conversation

steven-murray
Copy link
Contributor

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.

Copy link

codecov bot commented Feb 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.21%. Comparing base (34d99e4) to head (c26a31c).
Report is 6 commits behind head on main.

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              
Flag Coverage Δ
unittests 97.21% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@jsdillon jsdillon left a 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),),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This kwarg needs documentation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

) | stackf

nf = stackf.shape[1]
flaggy_flags = np.zeros_like(stackf, dtype=bool)
Copy link
Member

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?

Copy link
Contributor Author

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(
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Contributor

@tyler-a-cox tyler-a-cox left a 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!

@steven-murray steven-murray merged commit 1b99ff1 into main Feb 12, 2025
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants