Skip to content

Adding Flare Advocate schema and testing it with an example#329

Open
ChiaraBartolini96 wants to merge 24 commits into
nasa-gcn:mainfrom
ChiaraBartolini96:main
Open

Adding Flare Advocate schema and testing it with an example#329
ChiaraBartolini96 wants to merge 24 commits into
nasa-gcn:mainfrom
ChiaraBartolini96:main

Conversation

@ChiaraBartolini96

Copy link
Copy Markdown

I have added the first schema realized to create GCN notices for flaring sources detected within the flare advocate pipeline.
This is a simple and starting schema to verify if the format is correct and if there are any errors.

Comment thread gcn/notices/fermi/lat/flare/flare.alert.schema.json Outdated
Comment thread gcn/notices/fermi/lat/flare/flare.alert.schema.json Outdated
Comment thread gcn/notices/fermi/lat/flare/flare.alert.schema.json Outdated
Comment thread gcn/notices/fermi/lat/flare/flare.alert.schema.json Outdated
Comment thread gcn/notices/fermi/lat/flare/flare.alert.schema.json Outdated
New example schema. We removed the entries that are not important for our GCN.
New version of the schema with all the suggestions we received implemented. We deleted the entries that are not important for the GCN, too.
We have gcn/notices/fermi/lat/flare/flare.example.json that is the new version
We have gcn/notices/fermi/lat/flare/flare.schema.json that is the new version
@jracusin jracusin mentioned this pull request Feb 18, 2026
@Vidushi-GitHub Vidushi-GitHub requested a review from jracusin March 3, 2026 23:20

@Vidushi-GitHub Vidushi-GitHub left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me.

Comment thread gcn/notices/fermi/lat/flare/flare.schema.json Outdated
@jracusin

jracusin commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

We're working on some rearrangement of the spectral information. See #351. Once that is merged in, we'll suggest some changes on the LAT schema to utilize it.

@Vidushi-GitHub

Vidushi-GitHub commented Apr 23, 2026

Copy link
Copy Markdown
Member

@ChiaraBartolini96
We have upgraded "$ref": "../../core/spectral/GammaRay.schema.json" to "$ref": "../../core/Spectral.schema.json".

photon_flux would be:
"flux": 1e-6, "flux_unit": "ph/cm2/s",

Kindly update your schema accordingly.

I have updated the reference "../../core/spectral/GammaRay.schema.json" to "../../core/Spectral.schema.json" as suggested
We changed the flux, flux_error, and flux_unit accordingly with the new schema
Comment thread gcn/notices/fermi/lat/flare/flare.schema.json
Comment thread gcn/notices/fermi/lat/flare/flare.schema.json Outdated
Corrections suggested implemented: description is now updated, the schema folder name is updated, and the $ref entries are one level more nested.
Comment thread gcn/notices/fermi/lat/flare/flare.example.json Outdated

@Vidushi-GitHub Vidushi-GitHub left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There is a validation error.
Please Run: npx prettier -c .

Comment on lines +7 to +8
"ra": 215.62657,
"dec": 32.38623,

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.

I know most of these flares are on known sources, but if there is a new source will you ever use ra_dec_error? If so, please add another example for an new or unknown flaring source.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

New sources are not selected by us because they need further checks and analysis. So, they can be part of GCN when we are 100% they are new sources, and we know what kind of sources they are.

Comment thread gcn/notices/fermi/lat/flare/flare.schema.json Outdated
Co-authored-by: Vidushi Sharma <103223246+Vidushi-GitHub@users.noreply.github.com>
Comment thread gcn/notices/fermi/lat/flare/flare.schema.json Outdated
Substituting index and index_error with alpha and alpha_error from PowerLaw.schema.json
Added core/models/PowerLaw.schema.json to use alpha and alpha_error inside it

@Vidushi-GitHub Vidushi-GitHub left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me.

Except one validation test is failing.
Please run npx prettier -c ., it will fix the format.

Applied npx prettier -w . command to fix the format.
Applied npx prettier -w - to fix the format

@Vidushi-GitHub Vidushi-GitHub left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There is a error in schema filename.
Please modify gcn/notices/fermi/lat/flare/flare.schema.json to gcn/notices/fermi/lat/flare.schema.json.

Rest looks good to me!

Deletedthe flare directory which is not useful for our case
Schema in the correct location.
Example in the correct location.
@jracusin

Copy link
Copy Markdown
Contributor

This looks good, but there's a validation error. @Vidushi-GitHub will suggest the correction.

"unevaluatedProperties": false,
"allOf": [
{
"$ref": "../../../core/Alert.schema.json"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
"$ref": "../../../core/Alert.schema.json"
"$ref": "../../core/Alert.schema.json"

"$ref": "../../../core/Alert.schema.json"
},
{
"$ref": "../../../core/DateTime.schema.json"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
"$ref": "../../../core/DateTime.schema.json"
"$ref": "../../core/DateTime.schema.json"

"$ref": "../../../core/DateTime.schema.json"
},
{
"$ref": "../../../core/Event.schema.json"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
"$ref": "../../../core/Event.schema.json"
"$ref": "../../core/Event.schema.json"

"$ref": "../../../core/Event.schema.json"
},
{
"$ref": "../../../core/Localization.schema.json"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
"$ref": "../../../core/Localization.schema.json"
"$ref": "../../core/Localization.schema.json"

"$ref": "../../../core/Localization.schema.json"
},
{
"$ref": "../../../core/Reporter.schema.json"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
"$ref": "../../../core/Reporter.schema.json"
"$ref": "../../core/Reporter.schema.json"

"$ref": "../../../core/Reporter.schema.json"
},
{
"$ref": "../../../core/Spectral.schema.json"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
"$ref": "../../../core/Spectral.schema.json"
"$ref": "../../core/Spectral.schema.json"

"$ref": "../../../core/Spectral.schema.json"
},
{
"$ref": "../../../core/models/PowerLaw.schema.json"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
"$ref": "../../../core/models/PowerLaw.schema.json"
"$ref": "../../core/models/PowerLaw.schema.json"

@Vidushi-GitHub Vidushi-GitHub left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The core schema directory structure needs to be fixed.

I have a question: do you plan to add more notices from the Flare group?
If so, it may be better to make flare a directory and keep alert.json.schema as a file within it. Currently, the location is fermi/lat, where flare.json.schema is a file.
In future, grb group will also add schema/directory in lat folder.

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