Skip to content

Add event timestamps to the trigger_statistics.py output in the DQM#308

Merged
jlenain merged 3 commits into
cta-observatory:mainfrom
alessandromontanari:dqm-add-timestamps-trig-stat-output
Apr 30, 2026
Merged

Add event timestamps to the trigger_statistics.py output in the DQM#308
jlenain merged 3 commits into
cta-observatory:mainfrom
alessandromontanari:dqm-add-timestamps-trig-stat-output

Conversation

@alessandromontanari
Copy link
Copy Markdown
Contributor

This PR adds two subdictionaries to the results dictionary output of get_results() in trigger_statistics.py. This is needed to write into the database for future display on the DQM web app.

- trigger_statistics.py: add arrays of event timestamps to get_results(), to be written into the database
- trigger_statistics.py: convert event timestamps in output directly to arrays
- trigger_statistics.py: add arrays of event ids to get_results(), to be written into the database
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 48.94%. Comparing base (90fb11c) to head (800bfb9).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/nectarchain/dqm/trigger_statistics.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #308      +/-   ##
==========================================
- Coverage   48.95%   48.94%   -0.02%     
==========================================
  Files          85       85              
  Lines        7734     7736       +2     
==========================================
  Hits         3786     3786              
- Misses       3948     3950       +2     

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

@jlenain jlenain added the enhancement New feature or request label Apr 30, 2026
Copy link
Copy Markdown
Collaborator

@jlenain jlenain left a comment

Choose a reason for hiding this comment

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

Thanks a lot, @alessandromontanari !

@jlenain jlenain merged commit bcb16b2 into cta-observatory:main Apr 30, 2026
18 of 27 checks passed
@jlenain jlenain deleted the dqm-add-timestamps-trig-stat-output branch April 30, 2026 07:03
@jlenain
Copy link
Copy Markdown
Collaborator

jlenain commented May 4, 2026

Argh, we may need to fix this PR, @alessandromontanari !
The attribute event_wrong_id used at https://github.com/cta-observatory/nectarchain/pull/308/changes#diff-0eafca58d55d09abcadc8155b90b83d590c683bde79d4378ee0fdfb36b8dda0fR116 actually does not exist.

@alessandromontanari
Copy link
Copy Markdown
Contributor Author

Argh, we may need to fix this PR, @alessandromontanari ! The attribute event_wrong_id used at https://github.com/cta-observatory/nectarchain/pull/308/changes#diff-0eafca58d55d09abcadc8155b90b83d590c683bde79d4378ee0fdfb36b8dda0fR116 actually does not exist.

Ok, that's on me. I'll check it!

@jlenain
Copy link
Copy Markdown
Collaborator

jlenain commented May 5, 2026

I am afraid there is also something else when writing the DQM output, a local run gives me two following warnings:

100%|██████████████████████████████████████████████████████████████████████████| 6080/6080 [01:21<00:00, 74.77ev/s]
2026-05-05 09:15:21,193 WARNING [nectarchain.dqm.dqm_summary_processor] (dqm_summary_processor.write_all_results): Caught TypeError, skipping TRIGGER-EVENT-TIMESTAMPS. Details: Column 'col0' contains unsupported object types or mixed types: {dtype('O')}
2026-05-05 09:15:21,425 WARNING [nectarchain.dqm.dqm_summary_processor] (dqm_summary_processor.write_all_results): Caught TypeError, skipping TRIGGER-EVENT-IDS. Details: Column 'col0' contains unsupported object types or mixed types: {dtype('O')}

@alessandromontanari
Copy link
Copy Markdown
Contributor Author

I am afraid there is also something else when writing the DQM output, a local run gives me two following warnings:

100%|██████████████████████████████████████████████████████████████████████████| 6080/6080 [01:21<00:00, 74.77ev/s]
2026-05-05 09:15:21,193 WARNING [nectarchain.dqm.dqm_summary_processor] (dqm_summary_processor.write_all_results): Caught TypeError, skipping TRIGGER-EVENT-TIMESTAMPS. Details: Column 'col0' contains unsupported object types or mixed types: {dtype('O')}
2026-05-05 09:15:21,425 WARNING [nectarchain.dqm.dqm_summary_processor] (dqm_summary_processor.write_all_results): Caught TypeError, skipping TRIGGER-EVENT-IDS. Details: Column 'col0' contains unsupported object types or mixed types: {dtype('O')}

I'm on it, I should be done by today afternoon.

@jlenain
Copy link
Copy Markdown
Collaborator

jlenain commented May 5, 2026

I am afraid there is also something else when writing the DQM output, a local run gives me two following warnings:

100%|██████████████████████████████████████████████████████████████████████████| 6080/6080 [01:21<00:00, 74.77ev/s]
2026-05-05 09:15:21,193 WARNING [nectarchain.dqm.dqm_summary_processor] (dqm_summary_processor.write_all_results): Caught TypeError, skipping TRIGGER-EVENT-TIMESTAMPS. Details: Column 'col0' contains unsupported object types or mixed types: {dtype('O')}
2026-05-05 09:15:21,425 WARNING [nectarchain.dqm.dqm_summary_processor] (dqm_summary_processor.write_all_results): Caught TypeError, skipping TRIGGER-EVENT-IDS. Details: Column 'col0' contains unsupported object types or mixed types: {dtype('O')}

I'm on it, I should be done by today afternoon.

OK, thank you very much, @alessandromontanari !

@alessandromontanari alessandromontanari restored the dqm-add-timestamps-trig-stat-output branch May 5, 2026 11:12
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.

2 participants