Commit 354a646e authored by Brandon Piotrzkowski's avatar Brandon Piotrzkowski

EM-bright values are chosen from preferred event; Fixes #39

parent 25361111
Pipeline #56816 passed with stages
in 4 minutes and 22 seconds
......@@ -2,7 +2,7 @@
## 0.0.26 (unreleased)
- No changes yet.
- Updated to call EM-Bright json file from the preferred event files list; probabilities are between 0 and 1
## 0.0.25 (2019-04-08)
......
......@@ -48,7 +48,6 @@ def main_dict(gracedb_id, client):
other_pipelines.append(pipeline)
voevents = client.voevents(gracedb_id).json()['voevents']
log = client.logs(gracedb_id).json()['log']
files = client.files(gracedb_id).json()
gpstime = float(preferred_event['gpstime'])
event_time = astropy.time.Time(gpstime, format='gps').utc
......@@ -78,10 +77,11 @@ def main_dict(gracedb_id, client):
latency=issued_time-event_time.datetime)
break
skymaps = list(skymaps.values())
preferred_event_files = client.files(preferred_event_id).json()
em_brightfile = 'em_bright.json'
if em_brightfile in files:
if em_brightfile in preferred_event_files:
source_classification = client.files(
gracedb_id, em_brightfile).json()
preferred_event_id, em_brightfile).json()
source_classification = {
key: 100 * value for key, value in source_classification.items()}
......@@ -89,7 +89,6 @@ def main_dict(gracedb_id, client):
source_classification = {}
# adding the p_atro informations if available
preferred_event_files = client.files(preferred_event_id).json()
p_astro_file = 'p_astro.json'
if p_astro_file in preferred_event_files:
classifications = client.files(preferred_event_id, p_astro_file).json()
......
......@@ -9,5 +9,6 @@
"psd.xml.gz": "https://gracedb-dev1.ligo.org/api/events/M1234/files/psd.xml.gz",
"coinc.xml,0": "https://gracedb-dev1.ligo.org/api/events/M1234/files/coinc.xml,0",
"bayestar.fits.gz": "https://gracedb-dev1.ligo.org/api/events/M1234/files/bayestar.fits.gz",
"p_astro.json": "https://gracedb-dev1.ligo.org/api/events/M1234/files/p_astro.json"
}
\ No newline at end of file
"p_astro.json": "https://gracedb-dev1.ligo.org/api/events/M1234/files/p_astro.json",
"em_bright.json": "https://gracedb-dev1.ligo.org/api/events/M1234/files/em_bright.json"
}
......@@ -9,5 +9,6 @@
"psd.xml.gz": "https://gracedb-dev1.ligo.org/api/events/M5678/files/psd.xml.gz",
"coinc.xml,0": "https://gracedb-dev1.ligo.org/api/events/M5678/files/coinc.xml,0",
"bayestar.fits.gz": "https://gracedb-dev1.ligo.org/api/events/M5678/files/bayestar.fits.gz",
"p_astro.json": "https://gracedb-dev1.ligo.org/api/events/M5678/files/p_astro.json"
"p_astro.json": "https://gracedb-dev1.ligo.org/api/events/M5678/files/p_astro.json",
"em_bright.json": "https://gracedb-dev1.ligo.org/api/events/M5678/files/em_bright.json"
}
......@@ -14,7 +14,6 @@
"bayestar.fits.gz,0": "https://gracedb-dev1.ligo.org/api/events/S1234/files/bayestar.fits.gz,0",
"S1234-1-Initial.xml": "https://gracedb-dev1.ligo.org/api/events/S1234/files/S1234-1-Initial.xml",
"S1234-2-Update.xml": "https://gracedb-dev1.ligo.org/api/events/S1234/files/S1234-2-Update.xml",
"em_bright.json": "https://gracedb-dev1.ligo.org/api/events/S1234/files/em_bright.json",
"coincidence_far.json": "https://gracedb-dev1.ligo.org/api/events/S1234/files/coincidence_far.json",
"bayestar-gbm.fits.gz": "https://gracedb-dev1.ligo.org/api/events/S1234/files/bayestar-gbm.fits.gz"
}
......@@ -13,6 +13,5 @@
"LALInference.fits.gz,0": "https://gracedb-dev1.ligo.org/api/events/S5678/files/LALInference.fits.gz,0",
"S5678-1-Initial.xml": "https://gracedb-dev1.ligo.org/api/events/S5678/files/S5678-1-Initial.xml",
"S5678-2-Update.xml": "https://gracedb-dev1.ligo.org/api/events/S5678/files/S5678-2-Update.xml",
"em_bright.json": "https://gracedb-dev1.ligo.org/api/events/S5678/files/em_bright.json",
"coincidence_far.json": "https://gracedb-dev1.ligo.org/api/events/S5678/files/coincidence_far.json"
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment