Closed Kai-FengChen closed 2 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 97.18%. Comparing base (
cc0a13d
) to head (b1288c5
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Yes so the idea is because we now keep track of N-samples, channels that are originally flagged and inpainted will still have zero nsample
. If we used the original lstbin routine, the inpainted channel will be weighted by 0 during lstbining. By changing to this only_weighted_by_flag
option we can average inpainted data with real data during lstbining.
After a quick discussion with @jsdillon, I removed the tester test_lstbin.py
for the old lst binner and resolved some conflicts to have this PR ready to be merged.
As a reminder, this PR is for the H4C re-run so that we are able to properly propagate nsample (i.e., treat inpainted channels as having nsample 0) but still use inpainted data during lst binning (so weight data by flagging pattern instead of nsample).
Add an option
weight_by_nsamples
(defaultTrue
). When turning off, will weight only by flagging patterns but still propagate the nsamples.(Minor concern: Is it a bad practice to set something with default
True
? When modifying thearg_parser
it feels a bit weird to have an argument that hasaction="store_true"
but also default to beTrue
... But in my defence,weight_by_nsamples
seems more straightforward thannot_weight_by_nsamples
)