Open adampbeardsley opened 5 years ago
What radius did you use there?
Also, perhaps we want to consider larger radii in frequency than in time. And maybe we want some kind of "filling in" where if there are less than N bins between two flags in some dimension, we fill in flags.
This was a radius of 3 pixels.
Yeah, would be interesting to set time/freq radii separately. And we talked a little about the filling in idea on slack. We agreed this would take some refactoring... and is likely a future project (hence the issue for now)
Note the example given actually isn't the best because it's trying to use the narrowband RFI to grab the more broadband feature. There are other cases (TODO: find them) where a pixel in the feature itself gets flagged, but we do not successfully flag the whole thing.
After @jsdillon's rewrite of the watershed #296 , I think this will be much more approachable.
Yeah, you just have to play around with changing the kernel.
In prepping for IDR2.2, I've noticed quite a few situations like this:
There is a clear streak of contamination, but the channels right next to existing flags are below our "adjacent" threshold, while some beyond are above. We could simply have the watershed look farther out, say three pixels. Paul suggested a quick test, which seems promising:
Results:
It's in the right direction, but I think ultimately there needs to be significant tuning.
Alternatively, I suspect Mike W's match filter would catch this stuff pretty easily.