SkyPlot Documentation#
skyplot is a visualization library for CMB and other astrophysical sky maps
and aims to make figures optimized for publications and presentations easier.
Features#
Inputs can be 1D HEALPix arrays, 2D arrays plus
wcs=, or pixell ndmap-like objects with a.wcsattribute.Available projections are
mollweide,orthographic,platecarree,equidistantconic, andgnomonic.Preset sampling densities are
low=(480, 960),medium=(720, 1440), andhigh=(1440, 2880);mediumis the default.cmapaccepts Matplotlib colormap names and names from thecolormapspackage. See colormaps documentation for supported colormaps;planckandplanck_logare also available.Binary mask and transparent vector overlays are available through
plot_mode="overlay_mask"andplot_mode="vector_field". Vector overlays are drawn on axes from a prior scalar magnitude-map call.Comes optimized for publication and presentation quality figures.
Installation#
Install from conda-forge (recommended). This installs SkyPlot and its dependencies in a compatible environment.
conda install -c conda-forge skyplot
For development, clone the repository and install it in an isolated Python environment. The editable install keeps your environment in sync with local source changes.
git clone https://github.com/1cosmologist/skyplot.git
cd skyplot
python -m venv .venv # if needed
source .venv/bin/activate # Windows: .venv\Scripts\activate
python -m pip install --upgrade pip
python -m pip install .
For the test and documentation dependencies, install the optional extras:
python -m pip install -e '.[dev,docs]'
Longitude convention#
Important: Longitude increases from \(-180^\circ\) to \(180^\circ\) from left to right
to keep the astro convention used in CMB map plots. \(({\rm lon}=0^\circ, {\rm lat}=0^\circ)\)
is the center of any map by default. With astro convention, the logitude increases to the left till
\(180^\circ\) and then wraps around increasing from \(180^\circ\) to \(360^\circ\)
(which wraps to \(0^\circ\)). In skyplot we transform the \(180^\circ\) to \(360^\circ\)
range as \(({\rm longitude} - 360^\circ)\). This is more suitable for passing arguments to the
extent kwargs.
Contents