cta-observatory / ctapipe

Low-level data processing pipeline software for CTAO or similar arrays of Imaging Atmospheric Cherenkov Telescopes
https://ctapipe.readthedocs.org
BSD 3-Clause "New" or "Revised" License
64 stars 268 forks source link

Add iterative tailcuts cleaning variant #2329

Open clara-escanuela opened 1 year ago

clara-escanuela commented 1 year ago

This would be my approach for Issue #2326

kosack commented 1 year ago

I'd suggest making this a separate cleaning function, rather than modifying TailCuts (which has already been modified so many times that it hardly looks simple anymore). Since tailcuts is the default algorithm, it's best to keep it simple. Another possibility is to make this algorithm call the tailcuts function, rather than modify it. That might require a small modification, but better than adding a loop to tailcuts_clean where there wasn't one before.

You will also need to add a new ImageCleaner subclass.

Hckjs commented 1 year ago

Maybe also have a look at this part of the VolumeReducer, i think its quite similar. Maybe you can write a function used in both classes?

clara-escanuela commented 1 year ago

Maybe also have a look at this part of the VolumeReducer, i think its quite similar. Maybe you can write a function used in both classes?

That would make sense I think. Or can we somehow alter the "dilate" function so that it has the option to only dilate pixels above certain threshold?

clara-escanuela commented 1 year ago

I think it is better to just add it as an extra cleaning method, otherwise dilate would not be so general and more input parameters would be required

clara-escanuela commented 1 year ago

By the way, what is the reason for CI / docs to fail? The error message is not so clear to me and I am curious as this is also happening in my other PR

codecov[bot] commented 9 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (8d61c03) 92.47% compared to head (0fa134b) 92.49%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2329 +/- ## ========================================== + Coverage 92.47% 92.49% +0.02% ========================================== Files 234 234 Lines 19965 20020 +55 ========================================== + Hits 18462 18517 +55 Misses 1503 1503 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.