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

Fix uncertainty calculation in StereoMeanCombiner #2658

Merged
merged 8 commits into from
Dec 3, 2024

Conversation

LukasBeiske
Copy link
Contributor

@LukasBeiske LukasBeiske commented Nov 22, 2024

This fixes a problem with the uncertainties calculated by StereoMeanCombiner where the mapping of telescope events to array events did not work correctly. This resulted in many nan values in e.g. the RandomForestRegressor_energy_uncert column.

In doing so, I added a new module (ctapipe.vectorization) for the helper functions I implemented. This module also contains a faster (numba) alternative to np.unique, ctapipe.vectorization.get_subarray_index.

This is part of #2497, but I think this should be fixed regardless of the other content of that PR.

This comment has been minimized.

@maxnoe maxnoe added this to the v0.23.1 milestone Nov 29, 2024

This comment has been minimized.

maxnoe
maxnoe previously approved these changes Dec 2, 2024
@maxnoe
Copy link
Member

maxnoe commented Dec 2, 2024

The coverage here is too low because we cannot get a valid coverage reported for the numba jitted code, the actual coverage is pretty close to 100 %.

maxnoe
maxnoe previously approved these changes Dec 2, 2024

This comment has been minimized.

@maxnoe maxnoe requested a review from kosack December 2, 2024 14:12
docs/changes/2658.bugfix.rst Outdated Show resolved Hide resolved
Copy link

Failed

  • 76.80% Coverage on New Code (is less than 80.00%)

Analysis Details

1 Issue

  • Bug 0 Bugs
  • Vulnerability 0 Vulnerabilities
  • Code Smell 1 Code Smell

Coverage and Duplications

  • Coverage 76.80% Coverage (93.80% Estimated after merge)
  • Duplications 0.00% Duplicated Code (0.70% Estimated after merge)

Project ID: cta-observatory_ctapipe_AY52EYhuvuGcMFidNyUs

View in SonarQube

@maxnoe maxnoe requested a review from Hckjs December 2, 2024 17:38
@maxnoe maxnoe merged commit 1156181 into main Dec 3, 2024
12 of 13 checks passed
@maxnoe maxnoe deleted the fix_stereo_comb_uncert branch December 3, 2024 09:14
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.

4 participants