Skip to content

Commit

Permalink
Replace localization uncertainty properties with one error radius
Browse files Browse the repository at this point in the history
Replace the localization properties `uncertainty_shape`,
`ra_uncertainty`, `dec_uncertainty`, and `position_angle` with a
single property called `ra_dec_error`.

The original localization uncertainty properties were ill-conceived
in many ways:

1. The names `ra_uncertainty` and `dec_uncertainty` were
   misleading. For example, for ellipses, these fields actually
   represented the lengths of the semi-major and semi-minor axes,
   and not the uncertainty in ra or dec.

2. The names of these properties were inconsistent with other
   schema. Every other uncertainty property exept for these has a
   name ending in `_error`, not `_uncertainty`.

3. The `rectangle` shape was not useful. The most significant
   examples of quadrilateral localization regions are IPN error
   boxes. However, these are parallelograms, not rectangles, so
   the shape would have been under-specified.

We have observed that all current missions in GCN either report
error circles or HEALPix maps. Given that observation, this patch
replaces all of the ill-conceived localization properties with
a single `ra_dec_error` field which is the radius in degrees of
the error circle.

In the future, there might be a mission that requires ellipses.
We won't deal with that now, but in that event we would have a
few different backwards-compatible options. For example, we could:

- Treat the `ra_dec_error` field as the semi-major axis, and add
  optional fields `ra_dec_error_b` and `ra_dec_error_pa` for the
  semi-minor axis and the position angle, respectively; or

- Allow `ra_dec_error` to be either a single scalar, or an array
  of up to three numbers, representing the semi-major axis,
  semi-minor axis, and position angle, respectively.

Fixes #120.
  • Loading branch information
lpsinger committed Feb 21, 2024
1 parent 244a31c commit 57987b4
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 38 deletions.
4 changes: 1 addition & 3 deletions gcn/notices/burstcube/Alert.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
"id": ["240601000"],
"ra": 232.0,
"dec": -53.1,
"uncertainty_shape": "circle",
"ra_uncertainty": [10],
"dec_uncertainty": [10],
"ra_dec_error": 10,
"containment_probability": 0.9,
"systematic_included": false,
"healpix_url": "https://heasarc.gsfc.nasa.gov/burstcube/trigger/240601000/current/240601000_locmap.fits",
Expand Down
4 changes: 1 addition & 3 deletions gcn/notices/burstcube/Test.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
"id": ["240601000"],
"ra": 232.0,
"dec": -53.1,
"uncertainty_shape": "circle",
"ra_uncertainty": [10],
"dec_uncertainty": [10],
"ra_dec_error": 10,
"containment_probability": 0.9,
"systematic_included": false,
"healpix_url": "https://heasarc.gsfc.nasa.gov/burstcube/trigger/240601000/current/240601000_locmap.fits",
Expand Down
5 changes: 1 addition & 4 deletions gcn/notices/core/Localization.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
"$schema": "https://gcn.nasa.gov/schema/main/gcn/notices/core/Localization.schema.json",
"ra": 120,
"dec": 45,
"uncertainty_shape": "ellipse",
"ra_uncertainty": [-0.1, 0.05],
"dec_uncertainity": [-0.2, 0.5],
"position_angle": 0,
"ra_dec_error": 0.5,
"containment_probability": 0.95,
"systematic_included": true,
"instrument_phi": 90,
Expand Down
20 changes: 2 additions & 18 deletions gcn/notices/core/Localization.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,9 @@
"type": "number",
"description": "ICRS declination [deg], utilizes the J2000 epoch and an equatorial coordinate system"
},
"uncertainty_shape": {
"enum": ["circle", "ellipse", "rectangle"],
"description": "In what manner are the errors in RA and Dec defined - as circular, elliptical, or rectangular shapes",
"default": "circle"
},
"ra_uncertainty": {
"type": "array",
"maxItems": 2,
"description": "Uncertainty in RA [deg] with optional asymmetric errors, measured from the RA in the schema; respective ex: [r], [r1], [l1-, l1+]. For ellipse, ra axis is r1 or semi-major axis."
},
"dec_uncertainty": {
"type": "array",
"maxItems": 2,
"description": "Uncertainty in Dec [deg] with optional asymmetric errors, measured from the Dec in the schema; respective ex: [r2], [l2-, l2+]. Not reported if circular and Dec axis is r2 or semi-minor axis for ellipse."
},
"position_angle": {
"ra_dec_error": {
"type": "number",
"description": "Anti-clockwise position angle from RA axis [deg]. Used if uncertainty_shape ellipse or rectangle is tilted w.r.t. standard (RA, Dec) coordinate.",
"default": 0
"description": "Radius [deg] of error circle with the given probability of containing the true, but unknown, position of the source (see containment_probability)"
},
"containment_probability": {
"type": "number",
Expand Down
6 changes: 2 additions & 4 deletions gcn/notices/icecube/lvk_nu_track_search.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
"localization": {
"ra": 17.48,
"dec": 16.15,
"uncertainty_shape": "circle",
"ra_uncertainty": [0.43],
"ra_dec_error": 0.43,
"containment_probability": 0.9,
"systematic_included": false
},
Expand All @@ -30,8 +29,7 @@
"localization": {
"ra": 13.82,
"dec": 18.66,
"uncertainty_shape": "circle",
"ra_uncertainty": [0.88],
"ra_dec_error": 0.88,
"containment_probability": 0.9,
"systematic_included": false
},
Expand Down
4 changes: 1 addition & 3 deletions gcn/notices/icecube/test/gold_bronze.update.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@
"alert_type": "update",
"ra": 345.82,
"dec": 9.01,
"uncertainty_shape": "rectangle",
"position_angle": 0,
"ra_uncertainty": [-1.5, 1.4],
"dec_uncertainty": [-1.2, 1.3],
"ra_dec_error": 1.3,
"containment_probability": 0.9,
"systematic_included": false,
"healpix_url": "https://roc.icecube.wisc.edu/public/",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
"alert_type": "initial",
"ra": 345.82,
"dec": 9.01,
"uncertainty_shape": "circle",
"ra_uncertainty": [0.51],
"ra_dec_error": 0.51,
"containment_probability": 0.9,
"systematic_included": false,
"trigger_time": "2023-04-16T05:22:26.150574Z",
Expand Down
2 changes: 1 addition & 1 deletion gcn/notices/swift/bat/guano.loc_arc_min.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"trigger_time": "2022-12-31T21:46:05.13Z",
"ra": 336.26,
"dec": 25.139,
"ra_uncertainty": [0.05],
"ra_dec_error": 0.05,
"containment_probability": 0.9,
"systematic_included": true,
"rate_snr": 15.8,
Expand Down

0 comments on commit 57987b4

Please sign in to comment.