-
Notifications
You must be signed in to change notification settings - Fork 77
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
Refactoring: Create LST Cleaning Component #1013
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Add new LSTImageCleaner class
- Adapt config handling - return also n_pixels in LSTImageCleaner for dl1.container in r0_to_dl1
- Missing if clause create some trouble - Use Telescope Parameters the right way
- Forgot to add tel_ids to cleaning parameters in the if clauses...
- Fix also little typo
- Fix also an issue with the get_only_main_island function
- Adapt also config file
- Add it directly to the LSTImageCleaner - Update Docstrings
- Add an additional function to the `LSTImageCleaner` to get a bit clearer - Add a few more docstrings - Adapt to r0_to_dl1 function - Add a new function to get the pedestal values right in the event loop for he pedestal cleaning
- The dlab-script now uses hte lst_image_cleaning function - Adapt also the `get_cleaning_params`-function
- Instead of creating an own function, use the ctapipe `largest_island` one
- Save few line in dl1ab script
- Log info was 1 line too early
- Dont raise an error now, when pedestal cleaning is set to true, but no pedestal values have already been processed in the r0_to_dl1 script - Instead just skip the pedestal cleaning part in the ImageCleaner - Dont have to use different configs now for r0_to_dl1 script and dl1ab script
Codecov Report
@@ Coverage Diff @@
## master #1013 +/- ##
==========================================
+ Coverage 71.54% 73.23% +1.69%
==========================================
Files 118 119 +1
Lines 11251 11308 +57
==========================================
+ Hits 8049 8281 +232
+ Misses 3202 3027 -175
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Referring to #972 and #667, I started refactoring the cleaning by creating a cleaning component which substitutes the cleaning parts in the
r0_to_dl1
anddl1ab
script.Main changes:
LSTImageCleaner
-class with a lot of traits for all the cleaning params and configurable by the config systemtailcuts_clean
2)tailcuts_clean
3)lst_image_cleaning
lst_image_cleaning
consist of the stepsapply_time_delta_cleaning
,apply_dynamic_cleaning
and selecting thelargest_island
which can be all turned on/off by the config systemctapipe.image.morphology.largest_island
and renamed it to largest_island because main_island could be a bit ambiguous (main island could be largest or brightest one)LSTImageCleaner
dl1ab
-script does not use theLSTImageCleaner
yet because it loops over the tables directly via pytables instead of using the EventSource (Want to switch that in a later PR). So the pedestal_cleaning part inside theLSTImageCleaner
is not yet used by any script.Concerns/Thoughts:
LSTImageCleaner
. But that would mean, that the thresholds are calculated again for every image which is a wasted effort (since it is calculated just once per run). But its not yet used as explained in the last bullet point above. So maybe its better to outsource the calculation of the pedestal thresholds outside the eventloop and pass them then to theLSTImageCleaner
? idk maybe someone has a good solution for that ...