diff --git a/gcn_classic_to_json/notices/CALET_GBM_FLT_LC/__init__.py b/gcn_classic_to_json/notices/CALET_GBM_FLT_LC/__init__.py index a8bfd25..0913329 100644 --- a/gcn_classic_to_json/notices/CALET_GBM_FLT_LC/__init__.py +++ b/gcn_classic_to_json/notices/CALET_GBM_FLT_LC/__init__.py @@ -2,6 +2,12 @@ from ... import utils +trig_id_descriptions = { + 5: "This is not a real event.\n", + 29: "There was a temporal coincidence with another event.\n", + 30: "This is a test submission.\n", +} + def parse(bin): assert bin[12] == 0, "Unused. According to docs: 'Always 0 for FLT_LC'" @@ -11,11 +17,7 @@ def parse(bin): lat, lon = bin[16:17].view(">i2") trig_id_bits = np.flip(np.unpackbits(bin[18:19].view(dtype="u1"))) - trig_id_descriptions = { - 5: "This is not a real event.\n", - 29: "There was a temporal coincidence with another event.\n", - 30: "This is a test submission.\n", - } + comments = "".join( [val for (key, val) in trig_id_descriptions.items() if trig_id_bits[key] == 1] ) @@ -34,7 +36,7 @@ def parse(bin): "trigger_type": "rate", "rate_energy_range": np.flip(bin[17:18].view(">i2")), "rate_snr": bin[9] * 1e-2, - "rate_duration": bin[10] * 1e-2, + "foreground_duration": bin[10] * 1e-2, "background_duration": bin[11] * 1e-2, "ra": bin[7] * 1e-4, "dec": bin[8] * 1e-4, diff --git a/gcn_classic_to_json/notices/CALET_GBM_FLT_LC/example.json b/gcn_classic_to_json/notices/CALET_GBM_FLT_LC/example.json index 2e26abf..9cdfe8e 100644 --- a/gcn_classic_to_json/notices/CALET_GBM_FLT_LC/example.json +++ b/gcn_classic_to_json/notices/CALET_GBM_FLT_LC/example.json @@ -12,7 +12,7 @@ 230 ], "rate_snr": 8.3, - "rate_duration": 4.0, + "foreground_duration": 4.0, "background_duration": 16.0, "ra": 193.85000000000002, "dec": 50.359,