Allow units for --ra
and --dec
, improve external trigger info table
#4965
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This allows PyGRB users to do
--ra 12deg
or--ra 2rad
, thus clearing confusion on the units and removing the need to convert from degrees to radians. It also improves the external trigger summary table in a couple ways.Standard information about the request
This is a new feature and restyling of result presentation.
This change affects mainly PyGRB.
This is backwards compatible, but it will print a warning if
--ra
and--dec
are used without units.Motivation
While doing some test PyGRB runs, @Thomas-JACQUOT and I ran into some confusion about which angular units we are supposed to use.
pycbc_multi_inspiral
,pycbc_pygrb_grb_info_table
and the workflow config now consistently take radians as input args. However, results are typically presented in degrees. More importantly, radians are seldom used in the astro community, so the user would have to manually convert degrees to radians as part of setting up PyGRB, which is annoying and risks introducing errors.The table shown by
pycbc_pygrb_grb_info_table
is also using a non-standard format for the UTC time, and too many digits for the sky location parameters.Contents
This introduces the ability to add a
deg
orrad
prefix to the values passed via--ra
and--dec
, thus clearing any confusion on the units. It is still possible to give unit-less values, in which case the code will assume they are radians (consistent with the old behavior) and print a warning.This change also cleans up the code of
pycbc_pygrb_grb_info_table
and changes its output so that 3 decimal digits are used for the sky location parameters, and the ISO date format is used for the UTC time.Links to any issues or associated PRs
N/A
Testing performed
I manually ran
pycbc_pygrb_grb_info_table
for GRB190427A.Before:
After:
Reference from the old production run:
Additional notes
N/A