HERA-Team / hera_cal

Library for HERA data reduction, including redundant calibration, absolute calibration, and LST-binning.
MIT License
11 stars 8 forks source link

hera_cal

codecov

The hera_cal package includes modules and scripts for the calibration and LST-binning of Hydrogen Epoch of Reionization Array (HERA) data, along with various helpful methods for filtering and smoothing of data and calibration solutions. These are meant for use interatively, as part of offline analysis (e.g. IDR 2.2), or as part of HERA's realtime analysis pipeline using hera_opm.

This package only officially supports python 3, though most functionality will still work in python 2.

Package Details

Modules

I/O and Data Handling

Calibration

LST-Binning

Filtering and Smoothing

Other Utilities

Scripts

Documentation

The only guaranteed up-to-date documentation of individual functions and classes are their docstrings.

The IDR2.2 Release Memo is a jupyter notebook that can run at NRAO and contains useful examples of data access and visualization.

Many modules have instructional notebooks avaible here, though some of those are out of date.

While hera_cal has a Read the Docs, it is wildly out of date.

Installation

Preferred installation method is pip install . in top-level directory. Alternatively, one can use python setup.py install. This will attempt to install all dependencies. If you prefer to explicitly manage dependencies, see below.

Dependencies

Those who use conda (preferred) may wish to install the following manually before installing hera_cal:

conda install -c conda-forge "numpy>=1.10" scipy scikit-learn h5py astropy pyuvdata

(note that h5py is a dependency of hera_qm, not hera_cal).

Other dependencies that will be installed from PyPI on-the-fly are:

hera_cal also has the optional dependency of aipy, and some functions will not work without this dependency. To install all optional dependencies, use pip install .[all] or pip install git+git://github.com/HERA-Team/hera_cal.git[all].

Development Environment

To install a full development environment for hera_cal, it can be useful to work with a fresh conda environment. These steps will get you up and running::

$ conda create -n hera_cal python=3
$ conda activate hera_cal
$ conda env update -n hera_cal -f environment.yml
$ pip install -e .

This installs extra packages than those required to use hera_cal, including hera_sim and pytest.

If you are developing hera_cal please install pre-commit: pip install pre-commit and then pre-commit install in the top-level directory. This will check your style before you make commits.

Running tests

Tests use the pytest framework. To run all tests, call pytest or python -m pytest from the base directory of the repo.

Issues and Contribution

Issues are tracked here. Please submit bugs, feature requests, etc. Contributions to this repo via pull request are welcome, though they require thorough peer review before merging into the master branch. To the best of our ability, all code should be covered with tests. The primary maintainer of hera_cal is @jsdillon. Other maintiners who can update the master branch include @AaronParsons, @nkern, @adampbeardsley, and @plaplant.