Skip to content

Commit

Permalink
Add basic docs for plot module
Browse files Browse the repository at this point in the history
  • Loading branch information
philbull committed May 10, 2018
1 parent 8c68cf6 commit 5a1dca3
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ You can find the code in the ``hera_pspec`` `GitHub repository <https://github.c
pspecdata
uvpspec
container
plot


Indices and tables
Expand Down
37 changes: 37 additions & 0 deletions docs/plot.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
Simple plotting functions
=========================

The ``hera_pspec.plot`` module contains functions for making simple plots of delay power spectra.

A simple example

.. code-block:: python
# Load or generate a UVPSpec object containing delay power spectra
uvp = ...
# Set which baseline-pairs should be included in the plot
blpairs = list(uvp.blpair_array) # This includes all blpairs!
# Plot the delay spectrum, averaged over all blpairs and times
# (for the spectral window with index=0, and polarization 'xx')
ax = hp.plot.delay_spectrum(uvp, [blpairs,], spw=0, pol='xx',
average_blpairs=True, average_times=True,
delay=False)
# Setting delay=False plots the power spectrum in cosmological units
For a more extensive worked example, see `this example Jupyter notebook <https://github.com/HERA-Team/hera_pspec/blob/master/examples/Plotting_examples.ipynb>`_.

.. contents::
:local:


Plot module
-----------

The only plotting function currently available in the `hera_pspec.plot` module is `delay_spectrum()`.

.. automodule:: hera_pspec.plot
:members:

0 comments on commit 5a1dca3

Please sign in to comment.