Skip to content

Implemenation of cloud correction procedure for joint analysis - #277

Draft
nzywucka wants to merge 10 commits into
masterfrom
cloud_correction
Draft

Implemenation of cloud correction procedure for joint analysis#277
nzywucka wants to merge 10 commits into
masterfrom
cloud_correction

Conversation

@nzywucka

@nzywucka nzywucka commented Feb 4, 2025

Copy link
Copy Markdown
Collaborator

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
@codecov

codecov Bot commented Feb 4, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.19%. Comparing base (785b6ec) to head (0ac1c8d).
⚠️ Report is 456 commits behind head on master.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

max_gap_lidar_shots : int or float

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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?

@aleberti aleberti added enhancement New feature or request new functionality For new functionalities labels Dec 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request new functionality For new functionalities

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants