Skip to content
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

Implemenation of cloud correction procedure for joint analysis #277

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

nzywucka
Copy link
Collaborator

@nzywucka nzywucka commented Feb 4, 2025

config.yaml: cloud_correction block was modified
lst_m1_m2_cloud_correction.py: interpolation function and additional cleaning procedure were added

lst_m1_m2_cloud_correction.py: interpolation function and additional cleaning procedure were added
@nzywucka nzywucka changed the title config.yaml: cloud_correction block was modified Implemenation of cloud correction procedure for joint analysis Feb 4, 2025
@nzywucka nzywucka requested a review from jsitarek February 4, 2025 15:42
Copy link

codecov bot commented Feb 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.19%. Comparing base (785b6ec) to head (0ac1c8d).

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 Sentry.
📢 Have feedback on the report? Share it here.

mean_subrun_timestamp : int or float
The mean timestamp of the processed subrun (format: unix).

max_gap_lidar_shots : int or float
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

simply float should suffice here


Parameters
-----------
mean_subrun_timestamp : int or float
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is int and float differently handled here (like two different definitions of time?)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vertical or inclined?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the transmission is vertical

image, dtype=bool
) # Assuming full mask if not defined
if tel_ids["LST-1"] == tel_id:
clean = tailcuts_clean(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is always None, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants