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 3 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"],
"hitl": 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.

},
"hitl": {
Copy link
Member

Choose a reason for hiding this comment

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

Would you like to rename it as "automatic", rather than providing a short form?
This field can be common in other missions as well and may create different name schemes.

@jracusin this field might be common for other missions, shall we add it in core schema?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Greetings, @Vidushi-GitHub and @jracusin:

To have it in the Core schema makes much more sense to me. (See: #202) In such case, we can simply drop it from this schema (GBM Alert) and survive until you decide on a name and update the Core. Some of our other notices use it regularly, but that is for the future.

So far, Fermi GBM has had it as "HITL" or "Human-in-the-Loop". I prefer to keep it this way. IMHO, "Automatic" inverts what people are used to receive and, secondly, the label is more ambiguous than "HITL". You should probably see if any other missions have an analog.

Copy link
Contributor

Choose a reason for hiding this comment

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

HITL was used in GCN Classic notices, so I'm okay with keeping it, as long as it's well described. It's not automatic, it is at least partially manual.

Copy link
Contributor

Choose a reason for hiding this comment

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

Could this instead be an enum with different types of localizations rather than a confusing boolean? e.g. flight, ground, HITL?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jracusin: Then we would be more stright forward to name it "human localization". HITL Is more general. I don't mind dropping it from the Alert. It should be in the Core anyway.

Copy link
Member

@Vidushi-GitHub Vidushi-GitHub Nov 5, 2024

Choose a reason for hiding this comment

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

After discussions "HILT" specific to GBM is fine.
Style looks inconsistent to other schema fields, if possible make the property name explicit like, human_in_loop or human_in_the_loop.

@shb46 are you considering to put it as enum?

Let's move this forward to some conclusion.

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: I renamed the field and adjusted the description accordingly. I'm keeping it as a boolean.

"type": "boolean",
"description": "\"Human in the loop\". 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, i.e. simply confirmed or approved by a human for further processing."
},
"trigger_algorithm_number": {
"type": "number",
"description": "The criterion number that caused the flight software to trigger. Not to be confused with flight software or any other version number."
Vidushi-GitHub marked this conversation as resolved.
Show resolved Hide resolved
},
"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.

Copy link
Contributor

Choose a reason for hiding this comment

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

@shb46 The design of the unified schema has always been to incorporate many of the classic notice types into the same topic so users can only follow 1 or 2 topics per instrument. You can send updates as more information to fill out as the schema becomes available, but rebuilding GCN Classic in the JSON-format was never the intention. We should discuss the deadline offline, as I assume that's tied to senior review.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jracusin: No problem, I can use topic gcn.notices.fermi.gbm for everything.

},
"minItems": 14,
"maxItems": 14,
"description": "Triggered detectors"
Copy link
Member

Choose a reason for hiding this comment

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

Please expand it

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: Description improved.

}
}
}
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 a real-life notice. 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"],
"hitl": false,
Copy link
Member

Choose a reason for hiding this comment

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

Please make the example field name consistent with schema.
Additionally, validate the schema against examples, in case any change is left out.

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: Changed. Thank you for the reminder!

"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 a real-life notice. 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"],
"hitl": 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 a real-life notice. 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.",
Vidushi-GitHub marked this conversation as resolved.
Show resolved Hide resolved
"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 a real-life notice. 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.",
Vidushi-GitHub marked this conversation as resolved.
Show resolved Hide resolved
"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