Skip to content

Detector and geocenter time in PyGRB results production#5337

Open
pannarale wants to merge 5 commits into
gwastro:masterfrom
pannarale:pygrb_postproc_fixes
Open

Detector and geocenter time in PyGRB results production#5337
pannarale wants to merge 5 commits into
gwastro:masterfrom
pannarale:pygrb_postproc_fixes

Conversation

@pannarale
Copy link
Copy Markdown
Contributor

This PR ensures that geocenter time and detector time are correctly tracked and used by PyGRB when producing:

  • minifollowups of loudest injections (geocenter time) and triggers (detector time)
  • tables of loudest events (detector time is also included)
  • SNR timeseries (geocenter time is used when overlaying time slides at a detector, but detector time is used when looking at a single slide).

Standard information about the request

This is an improvement in results presentation and also a bug fix [the follow up of a loud trigger performed with timeslid data should be performed at the correct time in the slid detector(s)]

This change affects: PyGRB

This change changes: result presentation / plotting

  • The author of this pull request confirms they will adhere to the code of conduct

@pannarale pannarale requested a review from titodalcanton May 20, 2026 08:06
@pannarale pannarale self-assigned this May 20, 2026
@pannarale pannarale added the PyGRB PyGRB development label May 20, 2026
@pannarale pannarale added v28_release_branch PRs to be cherry-picked into the v2.8 release branch v211_release_branch PRs to be cherry-picked into the v2.11 release branch labels May 20, 2026
@github-project-automation github-project-automation Bot moved this to In Progress in PyGRB Development May 20, 2026
Comment thread bin/pygrb/pycbc_pygrb_minifollowups Outdated
'Rec. RA', 'Rec. Dec', 'SNR', 'Chi^2', 'Null SNR']
th.extend([ifo+' SNR' for ifo in ifos])
th.extend([ifo+' time shift (s)' for ifo in ifos])
th.extend([ifo+' GPS time (s)' for ifo in ifos])
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For complete clarity, also change "GPS time" on line 448 to "GC GPS time (s)".

Comment thread bin/pygrb/pycbc_pygrb_page_tables Outdated
Comment on lines +486 to +488
format_strings.extend(['##.##' for _ in ifos])
format_strings.extend(['##.##' for _ in ifos])
format_strings.extend(['##.##' for _ in ifos])
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Use three decimal digits for GPS times here, and for the GC time on line 483 as well, as we can time low-mass mergers to ~1 ms but not much better.

Keep two for SNR and time shift.

'Rec. spin1z', 'Rec. spin2z', 'Rec. RA', 'Rec. Dec', 'SNR', 'Chi^2',
'Null SNR'] + [ifo+' SNR' for ifo in ifos] + ['BestNR']
'Null SNR'] + [ifo+' SNR' for ifo in ifos] + \
[ifo+' GPS time (s)' for ifo in ifos] + ['BestNR']
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same as above, also change "GPS time" to "GC GPS time (s)" on line 572.

Comment thread bin/pygrb/pycbc_pygrb_page_tables Outdated
'##.##', '##.##', '##.##', '##.##', '##.##', '##.##']
format_strings.extend(['##.##' for ifo in ifos])
format_strings.extend(['##.##' for _ in ifos])
format_strings.extend(['##.##' for _ in ifos])
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same as above, use three decimals for GPS times here and on line 593.

sites = [ifo[0] for ifo in ifos]
# Table header
# Check against pycbc_pygrb_minifollowups prior to changing any of these
# Injections are in zero-lag so no timing information at the IFOs is needed
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Might as well do the same change "GC GPS time (s)" here.

Comment on lines +151 to +154
# When looking at a single slide in a detector use the time at the detector
# Otherwise use the time at the geocenter to look at all slides at once
if opts.slide_id != 'all':
x_key = opts.ifo + '/end_time'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hmm, I see the point of this behavior, but it could be really confusing if things are not labeled clearly. Do the plot labels clearly indicate which time is being plotted?

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.

I introduced an x_label variable to indicate this properly.

@github-project-automation github-project-automation Bot moved this from In Progress to Changes Requested in PyGRB Development May 27, 2026
@pannarale pannarale requested a review from titodalcanton May 29, 2026 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PyGRB PyGRB development v28_release_branch PRs to be cherry-picked into the v2.8 release branch v211_release_branch PRs to be cherry-picked into the v2.11 release branch

Projects

Status: Changes Requested

Development

Successfully merging this pull request may close these issues.

2 participants