gwcelery.tasks.skymaps module

Annotations for sky maps.

(task)gwcelery.tasks.skymaps.annotate_fits(filecontents, versioned_filename, graceid, tags)[source]

Perform annotations on a sky map.

This function downloads a FITS file and then generates and uploads all derived images as well as an HTML dump of the FITS header.


Determine if a FITS file has distance information.

(task)gwcelery.tasks.skymaps.annotate_fits_volume(filecontents, *args)[source]

Perform annotations that are specific to 3D sky maps.

(task)gwcelery.tasks.skymaps.fits_header(filecontents, filename)[source]

Dump FITS header to HTML.

(task)gwcelery.tasks.skymaps.plot_allsky(*args, **kwds)[source]

Plot a Mollweide projection of a sky map using the command-line tool ligo-skymap-plot.

(task)gwcelery.tasks.skymaps.plot_volume(*args, **kwds)[source]

Plot a 3D volume rendering of a sky map using the command-line tool ligo-skymap-plot-volume.

(task)gwcelery.tasks.skymaps.flatten(filecontents, filename)[source]

Convert a HEALPix FITS file from multi-resolution UNIQ indexing to the more common IMPLICIT indexing using the command-line tool ligo-skymap-flatten.


Generate multi-resolution fits file from samples.

gwcelery.tasks.skymaps.plot_bayes_factor(logb, values=(1, 3, 5), labels=('', 'strong', 'very strong'), xlim=7, title=None, palette='RdYlBu')[source]

Visualize a Bayes factor as a bullet graph.

Make a bar chart of a log Bayes factor as compared to a set of subjective threshold values. By default, use the thresholds from Kass & Raftery (1995).

  • logb (float) – The natural logarithm of the Bayes factor.

  • values (list) – A list of floating point values for human-friendly confidence levels.

  • labels (list) – A list of string labels for human-friendly confidence levels.

  • xlim (float) – Limits of plot (-xlim to +xlim).

  • title (str) – Title for plot.

  • palette (str) – Color palette.


  • fig (Matplotlib figure)

  • ax (Matplotlib axes)


(Source code, png, hires.png, pdf)

Example Bayes factor plot
(task)gwcelery.tasks.skymaps.plot_coherence(*args, **kwds)[source]

LVAlert handler to plot the coherence Bayes factor.


contents (str, bytes) – The contents of the FITS file.


png – The contents of a PNG file.

Return type



Under the hood, this just calls plot_bayes_factor().


LVAlert handler to plot and upload a visualization of the coherence Bayes factor.


Under the hood, this just calls plot_coherence().