Skip to content

Commit

Permalink
Merge branch 'master' into hera_pspec_stokes
Browse files Browse the repository at this point in the history
  • Loading branch information
Chuneeta committed May 16, 2018
2 parents 59fe721 + a111e56 commit c53cb9a
Show file tree
Hide file tree
Showing 48 changed files with 3,385 additions and 3,954 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ install:
before_script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- "export MPLBACKEND=agg"
- sleep 3

script: nosetests hera_pspec --with-coverage --cover-package=hera_pspec
Expand Down
5 changes: 4 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@

# Mock-import modules to allow build to complete without throwing errors
import mock
MOCK_MODULES = ['numpy', 'scipy', 'scipy.interpolate', 'pyuvdata', 'h5py', 'aipy', 'omnical', 'linsolve', 'hera_qm', 'uvtools', 'hera_cal', 'healpy', 'scikit-learn']
MOCK_MODULES = ['numpy', 'scipy', 'scipy.interpolate', 'scipy.integrate',
'pyuvdata', 'h5py', 'aipy', 'omnical', 'linsolve', 'hera_qm',
'uvtools', 'hera_cal', 'healpy', 'scikit-learn', 'astropy',
'astropy.cosmology', 'matplotlib', 'matplotlib.pyplot', 'yaml']
for mod_name in MOCK_MODULES:
sys.modules[mod_name] = mock.Mock()

Expand Down
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
30 changes: 30 additions & 0 deletions docs/plot.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Simple plotting functions
=========================

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

The following example plots the power spectra from a ``UVPSpec`` object, averaged over baseline-pairs and times.

.. 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>`_.

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

.. autofunction:: hera_pspec.plot.delay_spectrum


4 changes: 3 additions & 1 deletion docs/pspec.rst
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ The most frequently-used methods from ``PSpecData`` are listed below. See :any:`

.. autoclass:: hera_pspec.PSpecData
:members: __init__, add, pspec, rephase_to_dset, scalar, delays, units
:noindex:


``UVPSpec``: Container for power spectra
Expand Down Expand Up @@ -167,6 +168,7 @@ The ``UVPSpec`` class
The most relevant methods from ``UVPSpec`` are listed below. See :any:`uvpspec` for a full listing of all methods provided by ``UVPSpec``.

.. autoclass:: hera_pspec.UVPSpec
:members: __init__, get_data, get_wgts, get_integrations, get_nsamples, get_dlys, get_kvecs, get_blpair_seps, select, read_hdf5, write_hdf5, generate_noise_spectra, average_spectra, fold_spectra, get_blpair_groups_from_bl_groups
:members: __init__, get_data, get_wgts, get_integrations, get_nsamples, get_dlys, get_kperps, get_kparas, get_blpair_seps, select, read_hdf5, write_hdf5, generate_noise_spectra, average_spectra, fold_spectra, get_blpair_groups_from_bl_groups
:noindex:


Loading

0 comments on commit c53cb9a

Please sign in to comment.