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.
- gwcelery.tasks.skymaps.is_3d_fits_file(filecontents)[source]¶
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.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.
- (task)gwcelery.tasks.skymaps.skymap_from_samples(samplefilecontents)[source]¶
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).
- Parameters
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.
- Returns
fig (Matplotlib figure)
ax (Matplotlib axes)
Example
(Source code, png, hires.png, pdf)
- (task)gwcelery.tasks.skymaps.plot_coherence(*args, **kwds)[source]¶
LVAlert handler to plot the coherence Bayes factor.
- Parameters
- Returns
png – The contents of a PNG file.
- Return type
Notes
Under the hood, this just calls
plot_bayes_factor()
.
- (task)gwcelery.tasks.skymaps.handle_plot_coherence(alert)[source]¶
LVAlert handler to plot and upload a visualization of the coherence Bayes factor.
Notes
Under the hood, this just calls
plot_coherence()
.