gwcelery.tasks.external_skymaps module¶
Create and upload external sky maps.
-
gwcelery.tasks.external_skymaps.
create_combined_skymap
(se_id, ext_id)[source]¶ Creates and uploads the combined LVC-Fermi skymap.
This also uploads the external trigger skymap to the external trigger GraceDB page.
-
(task)
gwcelery.tasks.external_skymaps.
get_skymap_filename
(graceid)[source]¶ Get the skymap fits filename.
If not available, will try again 10 seconds later, then 20, then 40, etc. until up to 10 minutes after initial attempt.
-
(task)
gwcelery.tasks.external_skymaps.
combine_skymaps
(skymap1filebytes, skymap2filebytes)[source]¶ This task combines the two input skymaps, in this case the external trigger skymap and the LVC skymap and writes to a temporary output file. It then returns the contents of the file as a byte array.
-
(task)
gwcelery.tasks.external_skymaps.
external_trigger
(graceid)[source]¶ Returns the associated external trigger GraceDB ID.
-
(task)
gwcelery.tasks.external_skymaps.
external_trigger_heasarc
(external_id)[source]¶ Returns the HEASARC fits file link.
-
(task)
gwcelery.tasks.external_skymaps.
get_external_skymap
(heasarc_link)[source]¶ Download the Fermi sky map fits file and return the contents as a byte array.
If not available, will try again 10 seconds later, then 20, then 40, etc. until up to 10 minutes after initial attempt.
-
(task)
gwcelery.tasks.external_skymaps.
get_upload_external_skymap
(graceid)[source]¶ If a Fermi sky map is not uploaded yet, tries to download one and upload to external event. If sky map is not available, passes so that this can be re-run the next time an update GCN notice is received.
-
gwcelery.tasks.external_skymaps.
create_external_skymap
(ra, dec, error)[source]¶ Create an sky map, either a gaussian or a single pixel sky map, given an RA, dec, and error radius.
Parameters: Returns: skymap – sky map array
Return type: numpy array
-
gwcelery.tasks.external_skymaps.
write_to_fits
(skymap, event, notice_type, notice_date)[source]¶ Write external sky map fits file, populating the header with relevant info.
Parameters: - skymap (numpy array) – sky map array
- event (dict) – Dictionary of Swift external event
Returns: skymap fits – bytes array of sky map
Return type: bytes array