Implemenation of cloud correction procedure for joint analysis - #277
Implemenation of cloud correction procedure for joint analysis#277nzywucka wants to merge 10 commits into
Conversation
lst_m1_m2_cloud_correction.py: interpolation function and additional cleaning procedure were added
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #277 +/- ##
=======================================
Coverage 77.18% 77.19%
=======================================
Files 22 22
Lines 2621 2622 +1
=======================================
+ Hits 2023 2024 +1
Misses 598 598 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Updated error_codes.py with new code for cloud correction error
3ef0d7e to
c6f1100
Compare
465d6a9 to
09e4589
Compare
| mean_subrun_timestamp : int or float | ||
| The mean timestamp of the processed subrun (format: unix). | ||
|
|
||
| max_gap_lidar_shots : int or float |
There was a problem hiding this comment.
simply float should suffice here
|
|
||
| Parameters | ||
| ----------- | ||
| mean_subrun_timestamp : int or float |
There was a problem hiding this comment.
is int and float differently handled here (like two different definitions of time?)
There was a problem hiding this comment.
The definition of time is the same. mean_subrun_timestamp is float
| Maximum allowed time gap for interpolation (in seconds). | ||
|
|
||
| lidar_report_file : str | ||
| Path to the yaml file containing LIDAR laser reports with columns: |
There was a problem hiding this comment.
you can add that it is created by <macro_name>
| mean_subrun_timestamp, max_gap_lidar_shots, lidar_report_file | ||
| ): | ||
| """ | ||
| Retrieves or interpolates LIDAR cloud parameters based on the closest timestamps to an input mean timestamp of the processed subrun. |
There was a problem hiding this comment.
I think you should add in this docstring that for the moment in the case of multiple clouds only the one with the lowest transmission is taken into account
| dHc : astropy.units.quantity.Quantity | ||
| Cloud thickness | ||
| trans : numpy.float64 | ||
| Transmission of the cloud |
There was a problem hiding this comment.
the transmission is vertical
| image, dtype=bool | ||
| ) # Assuming full mask if not defined | ||
| if tel_ids["LST-1"] == tel_id: | ||
| clean = tailcuts_clean( |
There was a problem hiding this comment.
this only increase the standard tailcuts thresholds, but you are not applying the time constraints anywhere with time_delta_cleaning, right?
and also for data it is important to have pedestal cleaning, such that the thresholds are increased for pixels affected by stars
| cmf=cmf, | ||
| ) | ||
|
|
||
| clean_camgeom = camgeom[clean_mask] |
There was a problem hiding this comment.
those 3 lines are exactly like lines 488-490, therefore can be extracted out of the loop.
the next 2 lines are different then lines 484-485 but play the same role - removing of empty events, so this part can be also extracted out of the loop with any of the two approaches
| clean_mask, image, peak_time = clean_image_with_modified_thresholds( | ||
| event_image=image, | ||
| event_pulse_time=peak_time, | ||
| unsuitable_mask=unsuitable_mask, |
There was a problem hiding this comment.
this is always None, right?
config.yaml: cloud_correction block was modified
lst_m1_m2_cloud_correction.py: interpolation function and additional cleaning procedure were added