Skip to content

Add test for deadtime and event time-difference distributions to Acceptance Verification#311

Open
alessandromontanari wants to merge 8 commits into
cta-observatory:mainfrom
alessandromontanari:av-deadtime-event-time-diff-distr
Open

Add test for deadtime and event time-difference distributions to Acceptance Verification#311
alessandromontanari wants to merge 8 commits into
cta-observatory:mainfrom
alessandromontanari:av-deadtime-event-time-diff-distr

Conversation

@alessandromontanari
Copy link
Copy Markdown
Contributor

feat(src/nectarchain/acceptance_verification_package):

  • gui.py: refactor to add deadtime test
  • deadtime.py: implement placeholder for deadtime test following TRR test suite logic

This PR will implement the test to plot deadtime and event time-difference distributions for the acceptance verification on site. It follows the logic already implemented for the TRR test suite.

- gui.py: refactor to add deadtime test

- deadtime.py: implement placeholder for deadtime test following TRR test suite logic
@alessandromontanari alessandromontanari self-assigned this May 4, 2026
@alessandromontanari alessandromontanari added the enhancement New feature or request label May 4, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 4, 2026

Codecov Report

❌ Patch coverage is 4.87805% with 39 lines in your changes missing coverage. Please review.
✅ Project coverage is 45.57%. Comparing base (bcb16b2) to head (4c2091d).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
src/nectarchain/trr_test_suite/deadtime.py 3.84% 25 Missing ⚠️
src/nectarchain/trr_test_suite/tools_components.py 0.00% 10 Missing ⚠️
src/nectarchain/trr_test_suite/utils.py 20.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #311      +/-   ##
==========================================
- Coverage   49.33%   45.57%   -3.77%     
==========================================
  Files          85       89       +4     
  Lines        7795     8616     +821     
==========================================
+ Hits         3846     3927      +81     
- Misses       3949     4689     +740     

☔ 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.

- ../trr_test_suite/deadtime.py: fix typo in docstring

- deadtime.py: implement computation and plots for deadtime and event time distributions, following login in trr_test_suite

- resources/source_type_labels.json: add labels and colors for source type, following what defined in ctapipe.containers.EventType
output_dir,
temp_output,
)

Copy link
Copy Markdown
Member

@tibaldo tibaldo May 5, 2026

Choose a reason for hiding this comment

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

Perhaps add also a band or line that visualizes the requirement B-TEL-1270 (+B-MST-1280), i.e. deadtime < 5% for trigger rates up to 7 MHz.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, will do. This is still a draft PR anyway because I haven't fully tested it.

Alessandro MONTANARI and others added 4 commits May 5, 2026 15:33
- deadtime.py: minor typo fixes, minor refactors in functions to accept acceptance verification inputs

- utils.py: minor refactors in plot_deadtime_and_expo_fit to accept input for acceptance verification

- tools_components.py: refactor in DeadtimeTestTool to extract event_type from ctapipe.containers.EventType
- utils.py: refactor plot_deadtime_and_expo_fit with temporary output for the GUI
- resources/source_type_labels.json: change color for SUBARRAY to pink

- deadtime.py: docstring and refactor few function arguments to display in the GUI
@alessandromontanari
Copy link
Copy Markdown
Contributor Author

Hi @tibaldo, with these last few pushes, this PR satisfies the same requirements as for the TRR deadtime test, and produces the plots for the GUI in acceptance_verification_package. With the CLI:

python deadtime.py --source 0 0 0 0 0 0 0 0 0 0 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 -r 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3347 3348 3349 3350 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 -c NectarCAMQM --evts 4000 --output ./

you can get the plots below:

deadtime_and_expo_fit_3556 deadtime_pc_vs_trigger_rate fitted_vs_collected_trigger_rates

You can also visualise the same plots via the GUI (in which you'll see the distributions for all the runs).

@alessandromontanari alessandromontanari marked this pull request as ready for review May 11, 2026 14:41
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.

3 participants