Plotting
This module contains a few helpful plotting routines for plotting spherical maps and simple MCMC stats and samples.
- plotting.plot_map(f, title=None, cbar=True, cmap='turbo', vmin=None, vmax=None, cbar_label='', oversample=True, centre0=False, coasts=False, mask=None)
Plots a single MW sampled spherical map.
- Parameters
f (array) – MW sampled image. Shape \((L, 2L - 1)\).
title (string) – Figure title
cbar (bool) – if
True
, plot the colour barcmap (string) – Name of a matplotlib colour map
vmin (float) – Minimum value. If
None
, will default to lowest value inf
.vmax (float) – Maximum value. If
None
, will default to highest value inf
.cbar_label (string) – Label for the colour bar. Requires
cbar=True
oversample (bool) – if
True
, oversamplesf
to bandlimit \(L=256\) so the image is not pixelatedcentre0 (bool) – if
True
, forces the colour map to be centred at 0. Overridesvmin,vmax
.coasts (bool) – if
True
, plots coastlines.mask (boolarray) – A binary MW mask. Mask is applied after any oversampling, so should be a higher resolution than
f
- Returns
matplotlib figure
- plotting.plot_wavelet_maps(f, L, B, J_min, dirs=1, spin=0, same_scale=True, **map_args)
Plots the scaling and wavelet maps of spherical map
f
.- Parameters
f (array) – MW sampled image. Shape \((L, 2L - 1)\).
L (int) – angular bandlimit
B (float) – wavelet scale parameter
J_min (int) – minimum wavelet scale
dirs (int) – azimuthal bandlimit for directional wavelets
spin (int) – spin number of spherical signal
same_scale (bool) – if
True
, wavelet maps are plotted on same colour scale**map_args – optional arguments for
plot_map()
- Returns
List of figures
- plotting.plot_evolution(logposteriors, L2s, L1s, figsize=(10, 8))
Plot the evolution of the MCMC chain.
- Parameters
logposteriors – array of log posterior probabilities of the saved MCMC samples. Plot shows the negative log posterior.
L2s – array of log gaussian data fidelities (L2 error norms)
L1s – array of log Laplacian priors (L1 norms)
figsize (tuple) – Figure size
- Returns
matplotlib figure
- plotting.plot_chain_sample(X, figsize=(10, 8))
Plots the real and imaginary parts of an MCMC sample
- Parameters
X – MCMC sample
figsize (tuple) – Figure size
- Returns
matplotlib figure