Skip to content

feat: add SNEWS2 coincidence alert schema#352

Open
medhansh29 wants to merge 2 commits into
nasa-gcn:mainfrom
medhansh29:feature/add-snews2-coincidence-schema
Open

feat: add SNEWS2 coincidence alert schema#352
medhansh29 wants to merge 2 commits into
nasa-gcn:mainfrom
medhansh29:feature/add-snews2-coincidence-schema

Conversation

@medhansh29

Copy link
Copy Markdown

Summary

Adds the initial JSON schema for Supernova Early Warning System 2.0 (SNEWS2) coincidence tier alerts to the GCN schema repository.

Files Added

  • gcn/notices/snews2/coincidence.schema.json — JSON schema defining the SNEWS2 CoincidenceTier alert format
  • gcn/notices/snews2/coincidence.test_alert.example.json — Example payload conforming to the schema

Schema Design

The schema inherits from 5 GCN Core schemas using allOf:

  • core/Alert.schema.json
  • core/Event.schema.json
  • core/Reporter.schema.json
  • core/DateTime.schema.json
  • core/Statistics.schema.json

SNEWS2-specific fields include:

  • snews2_tier — The SNEWS tier (CoincidenceTier only at this stage)
  • detector_names — Array of contributing detector names
  • event_times_utc — Array of neutrino arrival times per detector
  • tier_data — Tier-specific payload (p_values, false_alarm_prob, etc.)

Notes

  • Only the CoincidenceTier alert type is published to GCN at this time
  • All tests pass with npm run test

Comment thread gcn/notices/snews2/coincidence.schema.json Outdated
Comment thread gcn/notices/snews2/coincidence.schema.json Outdated
Comment thread gcn/notices/snews2/coincidence.schema.json
Comment thread gcn/notices/snews2/coincidence.test_alert.example.json Outdated
Comment thread gcn/notices/snews2/coincidence.schema.json Outdated
@jracusin jracusin requested a review from Vidushi-GitHub April 9, 2026 15:54
@medhansh29 medhansh29 force-pushed the feature/add-snews2-coincidence-schema branch from 4aeb4e8 to b5c541d Compare April 13, 2026 19:46
…hema for Supernova Early Warning System 2.0 (SNEWS2)\ncoincidence tier alerts.\n\nFiles added:\n- gcn/notices/snews2/coincidence.schema.json\n- gcn/notices/snews2/coincidence.test_alert.example.json\n\nUpdates to address reviewer feedback:\n- Renamed schema_version to snews_schema_version to prevent JSON Schema conflicts.\n- Replaced detector_names array with a detector_status object referencing the core DetectorStatus schema.\n- Updated event_times_utc to directly reuse the core DateTime trigger_time property referencing ISO 8601 definitions.\n- Transitioned timezone offsets to standard Zulu time (Z).
@medhansh29 medhansh29 force-pushed the feature/add-snews2-coincidence-schema branch from b5c541d to 160e2ec Compare April 13, 2026 19:48
@medhansh29

Copy link
Copy Markdown
Author

Key Changes:

Schema Versioning: Renamed schema_version to snews_schema_version to completely eliminate any ambiguity with the standard JSON $schema keyword.

Detector Status Enrichment: Replaced the simple detector_names string array with a detector_status object pattern mapping to DetectorStatus.schema.json via additionalProperties. This matches patterns established by missions like BurstCube and allows tracking whether detectors were triggered, on, or off.

Core DateTime Referencing: Updated the event_times_utc array to explicitly use a JSON Pointer $ref to ../core/DateTime.schema.json#/properties/trigger_time. By doing this, we seamlessly inherit the core schema's documentation and standard ISO 8601 constraints without duplicating logic.

@jracusin

Copy link
Copy Markdown
Contributor

Is there a formal scheme for naming these SNEWS events with an event_name?

Comment thread gcn/notices/snews2/coincidence.schema.json Outdated
Comment thread gcn/notices/snews2/coincidence.test_alert.example.json
@jracusin

Copy link
Copy Markdown
Contributor

In the GCN Classic notices, you also had the number of neutrinos detected and event duration. It would be interesting to have the number of neutrinos per detector.

@Vidushi-GitHub

Copy link
Copy Markdown
Member

Additionally, run npx prettier -c .
One of the validation is failing.

@mlinvill

Copy link
Copy Markdown

In the GCN Classic notices, you also had the number of neutrinos detected and event duration. It would be interesting to have the number of neutrinos per detector.

We don't have neutrino counts in the coincidence tier. This information is reported in the timing tier, which is out of the scope of this initial effort. I expect our GCN schema will be extended to handle this information in future efforts.

@medhansh29

Copy link
Copy Markdown
Author

Is there a formal scheme for naming these SNEWS events with an event_name?

No there is no formal event name, just the uuid passed generated which is passed into the $id field in the schema.

@medhansh29

Copy link
Copy Markdown
Author

Additionally, run npx prettier -c . One of the validation is failing.

Fixed in latest update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants