Add a heuristic time offset to data products to allow crude calculation of wallclock time
Open
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 3
- Forks
- 5
- Avg merge
- 4h 42m
- Merged PRs (30d)
- 6
Description
Here are some proposals. I will check that all of them are acceptable:
- this change will only affect the dataformats and dfmodules repos
- a new field should be added to the TriggerRecordHeader
- its data type should be
timestamp_t - its name should be
heuristic_time_offset??? - should we also add this field to the FragmentHeader so that Fragments could have their timestamps reasonably interpreted without needing an accompanying TRH?
- its data type should be
- in the dfmodules package, the primary change will be to populate this field. This change could be made in the FragmentReceiver or the DataWriter. The algorithm for populating this field should be something like the following:
- within each run, when the first TriggerRecord is created or received, look up the current Linux system time in number of seconds since the Epoch, convert that number of seconds into DUNE clock ticks (e.g. multiply by 5e7 for a 50 MHz clock), and determine the difference between that number of clock ticks and the trigger_timestamp that is stored in the TriggerRecordHeader. This value is the heuristic_time_offset for all TRs in the run, and this value should be stored in the TRH::heuristic_time_offset field of all TRs in the run.
- another change in the dfmodules package will be to update the hdf5_dump.py script to make use of this new field to produce a human-readable string for timestamp(s) in each TR and Fragment, as needed
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the TriggerRecordHeader and FragmentHeader definitions in the dataformats repository, then inspect FragmentReceiver, DataWriter, and hdf5_dump.py in dfmodules. Confirm where the first TriggerRecord is available and how timestamps are currently represented. Done means the agreed header field is populated consistently for a run and hdf5_dump.py renders human-readable timestamps for TriggerRecords and Fragments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100