Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fermi #199

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open

Fermi #199

Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions gcn/notices/fermi/gbm/alert.example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"$schema": "https://gcn.nasa.gov/schema/main/gcn/notices/fermi/gbm/alert.schema.json",
"additional_info": "Lightcurve and other quicklook files will not be created until about 15 minutes after the trigger.",
"alert_datetime": "2024-08-24T02:14:54",
"alert_tense": "current",
"alert_type": "initial",
"data_archive_page": "http://heasarc.gsfc.nasa.gov/FTP/fermi/data/gbm/triggers/2024/bn240812094",
"detectors_status": [
"triggered",
"on",
"triggered",
"triggered",
"on",
"on",
"triggered",
"on",
"on",
"on",
"on",
"on",
"on",
"on"
],
"event_name": ["GRB240824A"],
"human_in_the_loop": false,
"id": ["745121685", "bn240812094"],
"instrument": "GBM",
"latitude": 23.83,
"light_curve_url": "http://heasarc.gsfc.nasa.gov/FTP/fermi/data/gbm/triggers/2024/bn240812094/quicklook/glg_lc_medres34_bn240812094.gif",
Copy link
Contributor

Choose a reason for hiding this comment

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

These don't need to be alphabetical, and it seems strange to separate latitude and longitude. In general, these examples should be in some logical order.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Alphabetical order helps bookkeeping. I'd like to keep it this way.

"longitude": 257.4,
"messenger": "EM",
"mission": "Fermi",
"notice_type": "FERMI_GBM_ALERT",
"rate_duration": 2.048,
"rate_energy_range": [47, 291],
"rate_snr": 4.9,
"record_number": 1,
"spectrum": "energy",
"trigger_algorithm_number": 14,
"trigger_time": "2024-08-24T02:14:40.43",
"trigger_type": "rate",
"units": "keV"
}
51 changes: 51 additions & 0 deletions gcn/notices/fermi/gbm/alert.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"$id": "https://gcn.nasa.gov/schema/main/gcn/notices/fermi/gbm/alert.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "GCN Schema for Fermi GBM Alert Notices",
"description": "This schema is used to report Fermi GBM Alerts.",
"type": "object",
"allOf": [
{
"$ref": "../../core/AdditionalInfo.schema.json"
},
{
"$ref": "../../core/Alert.schema.json"
},
{
"$ref": "../../core/DateTime.schema.json"
},
{
"$ref": "../../core/Event.schema.json"
},
{
"$ref": "../../core/GeoLocBase.schema.json"
},
{
"$ref": "../../core/Reporter.schema.json"
},
{
"$ref": "../../core/Statistics.schema.json"
},
{
"$ref": "detectors.schema.json"
}
],
"properties": {
"notice_type": {
"type": "string",
"description": "Notice title"
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this be an enum? How many options are there for notice title? Are you always going to refer back to GCN Classic notice types? You don't need to be tied to those.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added "const": "FERMI_GBM_ALERT". This is redundant with $schema and the topic. Thanks for pointing out.

},
"human_in_the_loop": {
"type": "boolean",
"description": "Someimes abbreviated as \"HITL\". When false, the notice was generated entirely automatically. A value of true means that a human had an input, while the notice was being prepared. The latter includes notices, which weren't altered by the human input, but a human was given the option to make an input, or asked to confirm, or approve before further processing."
Copy link
Contributor

Choose a reason for hiding this comment

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

Is HITL also a notice type? This description could also be much more concise. For example:
"True when a human had input or confirmed before further processing; False when the process was fully automated."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Shorter and better. Thanks for the suggestion.

},
"trigger_algorithm_number": {
"type": "number",
"description": "The number identifying the algorithm that detected the gamma-ray burst and caused the trigger. \"Trigger algorithm\" here is a moniker for a method or a criterion that watches for significant rate increase in the observed rate. Multiple \"trigger algorithms\" are active simultaneously and any one can trigger independently. The trigger_algorithm_number, tells which one did."
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these trigger algorithms described somewhere in a document or paper. Can you just reference that document with something like the following. There's too much extra information in this description.
"The instrument flight software algorithm that triggered on this event, dependent on timescale, energy, and significance as described in ...".

},
"light_curve_url": {
"type": "string",
"description": "URL of the quicklook light curve plot"
}
}
}
18 changes: 18 additions & 0 deletions gcn/notices/fermi/gbm/detectors.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"$id": "https://gcn.nasa.gov/schema/main/gcn/notices/fermi/gbm/detectors.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "",
"description": "",
"type": "object",
"properties": {
"detectors_status": {
"type": "array",
"items": {
"$ref": "../../core/DetectorStatus.schema.json"
Copy link
Contributor

Choose a reason for hiding this comment

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

These can be referenced by name rather than indexed, which would then not require this detectors schema at all. See https://github.com/nasa-gcn/gcn-schema/blob/main/gcn/notices/burstcube/alert.example.json or https://github.com/nasa-gcn/gcn-schema/blob/main/gcn/notices/glowbug/Alert.schema.json, which you previously came up with.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we are discussing two design points here:

  1. Array vs. names;
  2. To $ref or not to $ref the core/DetectorStatus.

Thanks for suggesting an alternative to the array. The two choices were discussed at our pipeline meeting (1 vote for names) and the IOTL meeting. The 14-array won. Consider that it is a bit mask in the data products, in which the bits are indexed 0-13. The same is in the classic notes, incl. the text ones. Also the old and the new GBM tools use straight arrays. In retrospect, I should had used an array for Glowbug as well.

On point (2), if you would like to remove the $ref, I'll be happy to replace it with the enum. just let me know.

Copy link
Member

@Vidushi-GitHub Vidushi-GitHub Nov 26, 2024

Choose a reason for hiding this comment

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

Hi @shb46, Could you please implement the detectors schema within alert.schema.json?
I understand the logic of making it a library and calling it. But it's just a few lines field and would make alert.schema.json look like a self-consistent schema.

Are you planning to add more topics in the future and wanna call detectors.schema.json?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Vidushi-GitHub: The detectors schema, if we keep it, will be shared with another topic. Do you still want me to make it inline?

Copy link
Member

Choose a reason for hiding this comment

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

@shb46 Ok, thanks. If you plan to have more topics related to Fermi/GBM, then that's fine.
Please remember to limit topics per mission to simplify user subscriptions to new Notices. The new Schema allows multiple Notices using a single Schema since fields are not mandatory.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Vidushi-GitHub: Our intent was for GBM to have 5 topics. Hope that is not too much. I suspect we might need a 6th one. Separately, there might be topics for internal distribution only but this hasn't been discussed yet.

My plan is to have a 1-to-1-to-1 correspondence of classic notice types, schemas and topics. I think it is a little too late to steer towards making a single schema. We are ahead with approving the ALERT schema and it will set us back. My deadline is Dec 12.

},
"minItems": 14,
"maxItems": 14,
"description": "The array shows which of the 14 GBM detectors triggered, and for the rest, whether they are on or off. Array elements 0-11 correspond to NaI detectors 0-11, among which 10 and 11 are sometimes labeled as \"a\" and \"b\" respectively. The status of the BGO0 and BGO1 detectors is at indices 12 and 13."
}
}
}
43 changes: 43 additions & 0 deletions gcn/notices/fermi/gbm/strict/alert.1.example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"$schema": "https://gcn.nasa.gov/schema/main/gcn/notices/fermi/gbm/alert.schema.json",
"additional_info": "*** ABOUT THIS EXAMPLE: This is an example of a Fermi GBM Alert GCN notice. All fields, including the optional ones, are present. This 'about' note is not going to be part of streamed/real notices. This field may be missing or empty in case of no comments. An example of a typical notice comment follows. ***\n\nLightcurve and other quicklook files will not be created until about 15 minutes after the trigger.",
"alert_datetime": "2024-08-24T02:14:54",
"alert_tense": "current",
"alert_type": "initial",
"data_archive_page": "http://heasarc.gsfc.nasa.gov/FTP/fermi/data/gbm/triggers/2024/bn240812094",
"detectors_status": [
"triggered",
"on",
"triggered",
"triggered",
"on",
"on",
"triggered",
"on",
"on",
"on",
"on",
"on",
"on",
"on"
],
"event_name": ["GRB240824A"],
"human_in_the_loop": false,
"id": ["745121685", "bn240812094"],
"instrument": "GBM",
"latitude": 23.83,
"light_curve_url": "http://heasarc.gsfc.nasa.gov/FTP/fermi/data/gbm/triggers/2024/bn240812094/quicklook/glg_lc_medres34_bn240812094.gif",
"longitude": 257.4,
"messenger": "EM",
"mission": "Fermi",
"notice_type": "FERMI_GBM_ALERT",
"rate_duration": 2.048,
"rate_energy_range": [47, 291],
"rate_snr": 4.9,
"record_number": 1,
"spectrum": "energy",
"trigger_algorithm_number": 14,
"trigger_time": "2024-08-24T02:14:40.43",
"trigger_type": "rate",
"units": "keV"
}
43 changes: 43 additions & 0 deletions gcn/notices/fermi/gbm/strict/alert.1strict.example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"$schema": "https://gcn.nasa.gov/schema/main/gcn/notices/fermi/gbm/strict/alert.schema.json",
"additional_info": "*** ABOUT THIS EXAMPLE: This is an example of a Fermi GBM Alert GCN notice. All fields, including the optional ones, are present. This 'about' note is not going to be part of streamed/real notices. This field may be missing or empty in case of no comments. An example of a typical notice comment follows. ***\n\nLightcurve and other quicklook files will not be created until about 15 minutes after the trigger.",
"alert_datetime": "2024-08-24T02:14:54",
"alert_tense": "current",
"alert_type": "initial",
"data_archive_page": "http://heasarc.gsfc.nasa.gov/FTP/fermi/data/gbm/triggers/2024/bn240812094",
"detectors_status": [
"triggered",
"on",
"triggered",
"triggered",
"on",
"on",
"triggered",
"on",
"on",
"on",
"on",
"on",
"on",
"on"
],
"event_name": ["GRB240824A"],
"human_in_the_loop": false,
"id": ["745121685", "bn240812094"],
"instrument": "GBM",
"latitude": 23.83,
"light_curve_url": "http://heasarc.gsfc.nasa.gov/FTP/fermi/data/gbm/triggers/2024/bn240812094/quicklook/glg_lc_medres34_bn240812094.gif",
"longitude": 257.4,
"messenger": "EM",
"mission": "Fermi",
"notice_type": "FERMI_GBM_ALERT",
"rate_duration": 2.048,
"rate_energy_range": [47, 291],
"rate_snr": 4.9,
"record_number": 1,
"spectrum": "energy",
"trigger_algorithm_number": 14,
"trigger_time": "2024-08-24T02:14:40.43",
"trigger_type": "rate",
"units": "keV"
}
34 changes: 34 additions & 0 deletions gcn/notices/fermi/gbm/strict/alert.2.example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"$schema": "https://gcn.nasa.gov/schema/main/gcn/notices/fermi/gbm/alert.schema.json",
"additional_info": "*** ABOUT THIS EXAMPLE: This is an example of a Fermi GBM Alert GCN notice. Only stricly necessary fields are present. This 'about' note is not going to be part of streamed/real notices. This field may be missing or empty in case of no comments. An example of a typical notice comment follows. ***\n\nLightcurve and other quicklook files will not be created until about 15 minutes after the trigger.",
Copy link
Contributor

Choose a reason for hiding this comment

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

What is different between these examples, please add some info about their difference rather than number them in their name.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agree and done. Thanks!

"alert_datetime": "2024-08-24T02:14:54",
"data_archive_page": "http://heasarc.gsfc.nasa.gov/FTP/fermi/data/gbm/triggers/2024/bn240812094",
"detectors_status": [
"triggered",
"on",
"triggered",
"triggered",
"on",
"on",
"triggered",
"on",
"on",
"on",
"on",
"on",
"on",
"on"
],
"event_name": ["GRB240824A"],
"id": ["745121685", "bn240812094"],
"latitude": 23.83,
"light_curve_url": "http://heasarc.gsfc.nasa.gov/FTP/fermi/data/gbm/triggers/2024/bn240812094/quicklook/glg_lc_medres34_bn240812094.gif",
"longitude": 257.4,
"notice_type": "FERMI_GBM_ALERT",
"rate_duration": 2.048,
"rate_energy_range": [47, 291],
"rate_snr": 4.9,
"record_number": 1,
"trigger_algorithm_number": 14,
"trigger_time": "2024-08-24T02:14:40.43"
}
34 changes: 34 additions & 0 deletions gcn/notices/fermi/gbm/strict/alert.2strict.example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"$schema": "https://gcn.nasa.gov/schema/main/gcn/notices/fermi/gbm/strict/alert.schema.json",
"additional_info": "*** ABOUT THIS EXAMPLE: This is an example of a Fermi GBM Alert GCN notice. Only stricly necessary fields are present. This 'about' note is not going to be part of streamed/real notices. This field may be missing or empty in case of no comments. An example of a typical notice comment follows. ***\n\nLightcurve and other quicklook files will not be created until about 15 minutes after the trigger.",
"alert_datetime": "2024-08-24T02:14:54",
"data_archive_page": "http://heasarc.gsfc.nasa.gov/FTP/fermi/data/gbm/triggers/2024/bn240812094",
"detectors_status": [
"triggered",
"on",
"triggered",
"triggered",
"on",
"on",
"triggered",
"on",
"on",
"on",
"on",
"on",
"on",
"on"
],
"event_name": ["GRB240824A"],
"id": ["745121685", "bn240812094"],
"latitude": 23.83,
"light_curve_url": "http://heasarc.gsfc.nasa.gov/FTP/fermi/data/gbm/triggers/2024/bn240812094/quicklook/glg_lc_medres34_bn240812094.gif",
"longitude": 257.4,
"notice_type": "FERMI_GBM_ALERT",
"rate_duration": 2.048,
"rate_energy_range": [47, 291],
"rate_snr": 4.9,
"record_number": 1,
"trigger_algorithm_number": 14,
"trigger_time": "2024-08-24T02:14:40.43"
}
Loading
Loading