Skip to content

Latest commit

 

History

History
86 lines (57 loc) · 4.31 KB

README.md

File metadata and controls

86 lines (57 loc) · 4.31 KB

pySnowRadar

Build Tests DOI PyPI

A Python3 package to process data from CRESIS SnowRadar systems.

Install from the Python Package Index

$ pip install pySnowRadar

If you receive error messages pertaining to gdal_config or any other gdal-related issue, ensure that you have gdal installed and configured (we suggest installing gdal through conda!)

From-Source Installation

Install and initialize conda: https://docs.conda.io/en/latest/miniconda.html

Clone this repository, create the conda environment and install pySnowRadar:

(base) $ git clone https://github.com/kingjml/pySnowRadar.git
(base) $ cd ./pySnowRadar
(base) $ conda env create -f exact_dev_env.yml
(base) $ conda activate py3-pySnowRadar
(py3-pySnowRadar) $ pip install . 

Usage

Check out the Jupyter notebook examples for usage scenarios and code snippets:

pySnowRadar does not validate interface or snow depth estimates. It is highly recommended that users compare outputs with measurements or references to quantify errors. Users should consider uncertainties including but not limited to surface roughness, salinity, and sidelobes.

For reference, the following papers (not an exhaustive list) describe uncertainties involved with the handling of SnowRadar data: Panzer et al. (2013), Newman et al. (2014), Webster et al. (2014), King et al. (2015), Kwok et al. (2017)

Development and Contributing

The following instructions are suitable for users who have already cloned this repository and would like to modify the inner workings of pySnowRadar.

From inside the local clone or fork, create a new branch where your modifications will reside:

(py3-pySnowRadar) $ git checkout -b new_feature

After you make your modifications, you can test your changes by reinstalling pySnowRadar by using pip from within the local clone:

# Make sure you're in the proper python environment!
(py3-pySnowRadar) $ pip install . --upgrade

When you are satisfied with your changes, you may push your changes to github.com and open a pull request. For more information on pull requests, consult Github's Documentation

(Optional) Test-running

Test files are stored under the tests subdirectory and require the pytest and coverage packages.

Running tests

(py3-pySnowRadar) $ pytest 

Running tests and generating coverage reports

These commands run the tests and generate a coverage report for any untested files where the Missing columns indicates line numbers that still require testing

(py3-pySnowRadar) $ coverage run -m pytest
(py3-pySnowRadar) $ coverage report # to display the coverage report within a terminal

Sometimes it's nicer to see a html-ified coverage report, so use the following command:

(py3-pySnowRadar) $ coverage html 

This will generate a htmlcov folder containing the coverage report. Open htmlcov/index.html in a browser to see what code needs test coverage.