Skip to content

Removal of code duplication for UCTS timing in trr_test_suite#261

Open
pcorcam wants to merge 8 commits intocta-observatory:mainfrom
pcorcam:trr-ucts-duplication
Open

Removal of code duplication for UCTS timing in trr_test_suite#261
pcorcam wants to merge 8 commits intocta-observatory:mainfrom
pcorcam:trr-ucts-duplication

Conversation

@pcorcam
Copy link
Contributor

@pcorcam pcorcam commented Feb 10, 2026

Follow-up work on PR #244 and PR #260. Removes code duplication in the trr_test_suite regarding the UCTS computation. More specifically:

Main enhancement

  • UCTSContainer and UCTSComp are removed from trr_test_suite/tools_components.py;
  • The standard ChargesComponent (makers/components/charges_components.py) is now the component in the DeadtimeTestTool and TriggerTimingTestTool (trr_test_suite/tools_components.py);
  • The scripts trr_test_suite/deadtime.py and trr_test_suite/trigger_timing.py have been adapted accordingly. For the latter, pedestals are precomputed with the standard PedestalNectarCAMCalibrationTool and its output is fed to the ChargesComponent in the TriggerTimingTestTool.

Crosschecks

Crosscheck of deadtime.py

Results stay exactly the same after changing the component.

Using UCTSComp
deadtime_and_expo_fit_3341_old
deadtime_pc_vs_trigger_rate_old
fitted_vs_collected_trigger_rates_old

Using ChargesComponent
deadtime_and_expo_fit_3341_new
deadtime_pc_vs_trigger_rate_new
fitted_vs_collected_trigger_rates_new

Crosscheck of trigger_timing.py

We see a very small shift in charge (minor changes in computation methods), but overall the results look similar and remain well within the CTAO requirements.

Using UCTSComp
trigger_timing_old

Using ChargesComponent
trigger_timing_new

Conclusion

We are safe to remove the UCTSComp and UCTSContainer from the trr_test_suite.

@pcorcam pcorcam self-assigned this Feb 10, 2026
@pcorcam pcorcam added the enhancement New feature or request label Feb 10, 2026
@jlenain jlenain force-pushed the trr-ucts-duplication branch from 6be2436 to 66a01b2 Compare February 12, 2026 12:47
@codecov
Copy link

codecov bot commented Feb 12, 2026

Codecov Report

❌ Patch coverage is 17.50000% with 33 lines in your changes missing coverage. Please review.
✅ Project coverage is 52.18%. Comparing base (0070b30) to head (66a01b2).

Files with missing lines Patch % Lines
src/nectarchain/trr_test_suite/tools_components.py 0.00% 23 Missing ⚠️
src/nectarchain/trr_test_suite/trigger_timing.py 42.85% 8 Missing ⚠️
src/nectarchain/trr_test_suite/deadtime.py 33.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #261      +/-   ##
==========================================
+ Coverage   51.90%   52.18%   +0.28%     
==========================================
  Files          82       82              
  Lines        6845     6787      -58     
==========================================
- Hits         3553     3542      -11     
+ Misses       3292     3245      -47     

☔ View full report in Codecov by Sentry.
📢 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant