Skip to content

Commit

Permalink
Merge branch 'nasa-gcn:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
tabbott36 authored Nov 22, 2024
2 parents fb8a56b + a31d7ba commit dd64873
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 15 deletions.
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
# GCN Schema

This repository contains the schemas for crafting new GCN notices. It also includes mission-specific schemas and illustrative examples, which are distributed by [GCN Kafka](https://gcn.nasa.gov). The formulation of mission schemas is one step in the process for setting up [New Notice Producers](https://gcn.nasa.gov/docs/producers).
This repository contains the schemas for crafting new GCN notices. It also includes mission-specific schemas and illustrative examples, which are distributed by [GCN Kafka](https://gcn.nasa.gov). The formulation of mission schemas is one step in the process for setting up [New Notice Producers](https://gcn.nasa.gov/docs/notices/producers).

The alert format for new Notices over GCN Kafka is JavaScript Object Notation (JSON), a widely adopted Internet data format. We have designed a set of core schema which serve as the building blocks for new GCN Notices. Instrument-specific schema can also be created, but we request that you utilize the core schema as much as possible.

Please add your schema to this repository under <code>gcn/notices/<i>mission</i>/</code> and submit a pull request for the GCN Team to review. The GCN team is happy to iterate with the producers on their schema contents and format. Your pipeline will generate JSON files following these schema and send alerts to GCN as described in [New Notice Producers](https://gcn.nasa.gov/docs/notices/producers).

## How to Contribute

To get started, fork the [nasa-gcn/gcn-schema](https://github.com/nasa-gcn/gcn-schema) repository on GitHub and clone it on your computer. If you are new to GitHub, refer to our [GitHub primer](https://gcn.nasa.gov/docs/contributing/github).

After you have forked and cloned the repository, make sure that Node.js and NPM are installed on your computer. There are several options to install Node.js and NPM. Pick _one_ of the following:

- Download and run [the Node.js installer for your operating system](https://nodejs.org/en/download/).
- Install and use the [Node Version Manager, nvm](https://github.com/nvm-sh/nvm).
- Install using a [package manager](https://nodejs.org/en/download/package-manager/).

Finally, run the following command inside the repository working directory to install the pre-commit hooks for code formatting and syntax checking:

```
npm install
```

## How To Release

1. Clone the parent repo (nasa-gcn/gcn-schema).
Expand Down
14 changes: 5 additions & 9 deletions gcn/circulars.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,14 @@
"enum": ["text/plain", "text/markdown"],
"description": "Format of the body text as a MIME type. See https://gcn.nasa.gov/docs/circulars/markdown for documentation on using Markdown in Circulars"
},
"body": { "type": "string", "description": "Body text" },
"body": {
"type": "string",
"description": "Body text"
},
"createdOn": {
"type": "number",
"description": "Date and time the Circular is accepted and published onto the GCN Circulars archive, formatted as a UNIX timestamp (milliseconds since the UNIX epoch)"
}
},
"required": [
"eventId",
"submitter",
"subject",
"circularId",
"body",
"createdOn"
]
"required": ["submitter", "subject", "circularId", "body", "createdOn"]
}
2 changes: 2 additions & 0 deletions gcn/notices/icecube/lvk_nu_track_search.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"containment_probability": 0.9,
"systematic_included": false
},
"id": ["138590_39138551"],
"event_pval_generic": 0.0191,
"event_pval_bayesian": null
},
Expand All @@ -33,6 +34,7 @@
"containment_probability": 0.9,
"systematic_included": false
},
"id": ["138590_39164579"],
"event_pval_generic": 0.0928,
"event_pval_bayesian": 0.0656
}
Expand Down
11 changes: 10 additions & 1 deletion gcn/notices/icecube/lvk_nu_track_search.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,16 @@
},
"coincevent": {
"type": "object",
"allOf": [{ "$ref": "../core/Localization.schema.json" }],
"allOf": [
{
"$ref": "../core/Localization.schema.json",
"description": "Per-event direction and uncertainty information"
},
{
"$ref": "../core/Event.schema.json",
"description": "Unique per-event identification information"
}
],
"properties": {
"event_dt": {
"description": "Time difference between LVK alert time and neutrino candidate [sec]",
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@nasa-gcn/schema",
"description": "Unified JSON Schema for multi-messenger and high-energy astronomy alerts",
"version": "4.1.0",
"version": "4.2.0",
"repository": {
"type": "git",
"url": "github:nasa-gcn/gcn-schema"
Expand Down

0 comments on commit dd64873

Please sign in to comment.