Skip to content

Commit

Permalink
Merge pull request #50 from AdamTheisen/master
Browse files Browse the repository at this point in the history
Updates to documentation and more
  • Loading branch information
rcjackson committed May 2, 2019
2 parents 184879a + 04c4484 commit 5e7709c
Show file tree
Hide file tree
Showing 15 changed files with 59 additions and 93 deletions.
13 changes: 0 additions & 13 deletions AUTHORS.rst

This file was deleted.

14 changes: 7 additions & 7 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Types of Contributions
Report Bugs
~~~~~~~~~~~

Report bugs at https://github.com/AdamTheisen/arm-community-toolkit/issues.
Report bugs at https://github.com/ANL-DIGR/ACT/issues

If you are reporting a bug, please include:

Expand All @@ -35,14 +35,14 @@ is open to whoever wants to implement it.
Write Documentation
~~~~~~~~~~~~~~~~~~~

ARM Community Toolkit could always use more documentation, whether
as part of the official ARM Community Toolkit docs, in docstrings,
Atmospheric data Community Toolkit could always use more documentation, whether
as part of the official Atmospheric data Community Toolkit docs, in docstrings,
or even on the web in blog posts, articles, and such.

Submit Feedback
~~~~~~~~~~~~~~~

The best way to send feedback is to file an issue at https://github.com/AdamTheisen/arm-community-toolkit/issues.
The best way to send feedback is to file an issue at https://github.com/ANL-DIGR/ACT/issues

If you are proposing a feature:

Expand Down Expand Up @@ -200,7 +200,7 @@ An example:
"""
Returns `xarray.Dataset` with stored data and metadata from a
user-defined query of ARM-standard netCDF files from a single
user-defined query of standard netCDF files from a single
datastream.
Parameters
Expand Down Expand Up @@ -299,7 +299,7 @@ An example:
def test_correct_ceil():
# Make a fake ARM dataset to test with, just an array with 1e-7
# Make a fake dataset to test with, just an array with 1e-7
# for half of it.
fake_data = 10 * np.ones((300, 20))
fake_data[:, 10:] = -1
Expand Down Expand Up @@ -410,7 +410,7 @@ Before you submit a pull request, check that it meets these guidelines:
your new functionality into a function with a docstring, and add the
feature to the list in README.rst.
3. The pull request should work for Python 2.7, 3.6, 3.7 for PyPy. Check
https://travis-ci.org/AdamTheisen/arm-community-toolkit/pull_requests
https://travis-ci.org/ANL-DIGR/ACT
and make sure that the tests pass for all supported Python versions.

After creating a pull request through GitHub, and outside checker TravisCI
Expand Down
27 changes: 0 additions & 27 deletions LICENSE

This file was deleted.

11 changes: 11 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Copyright 2019 UChicago Argonne LLC

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
include AUTHORS.rst
include CONTRIBUTING.rst
include LICENSE
include README.rst

recursive-exclude * __pycache__
Expand Down
8 changes: 2 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,9 @@ Atmospheric Community Toolkit (ACT)
.. image:: https://img.shields.io/travis/ANL-DIGR/ACT.svg
:target: https://travis-ci.org/ANL-DIGR/ACT

Package for connecting Atmospheric Radation Measurement (ARM) users to the
Package for connecting Atmospheric data users to the
data. Has the ability to download, read, and visualize multi-file datasets from
ARM datastreams. Currently, multi-panel timeseries plots are supported. For
more on ARM and ARM datastreams:

* ARM: https://www.arm.gov/
* ARM Data Discovery: https://www.archive.arm.gov/discovery/
multiple data sources. Currently, multi-panel timeseries plots are supported.

* Free software: 3-clause BSD license

Expand Down
12 changes: 6 additions & 6 deletions act/corrections/ceil.py
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
import numpy as np


def correct_ceil(arm_obj, fill_value=1e-7):
def correct_ceil(obj, fill_value=1e-7):
"""
This procedure corrects celiometer data by filling all zero and
negative values of backscatter with fill_value and then converting
the backscatter data into logarithmic space.
Parameters
----------
arm_obj: ARM Dataset object
obj: Dataset object
The ceiliometer dataset to correct. The backscatter data should be
in linear space.
fill_value: float
The fill_value to use. The fill_value is entered in linear space.
Returns
-------
arm_obj: ARM Dataset object
obj: Dataset object
The celiometer dataset containing the corrected values.
"""

backscat = arm_obj['backscatter'].data
backscat = obj['backscatter'].data
backscat[backscat <= 0] = fill_value
backscat = np.log10(backscat)

arm_obj['backscatter'].data = backscat
obj['backscatter'].data = backscat

return arm_obj
return obj
2 changes: 1 addition & 1 deletion act/discovery/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
download_data
"""
from .get_files import download_data
from .get_armfiles import download_data
File renamed without changes.
36 changes: 18 additions & 18 deletions act/plotting/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class with this set to None will create a new figure handle. See the
Parameters
----------
arm_obj: ACT Dataset, dict, or tuple
obj: ACT Dataset, dict, or tuple
The ACT Dataset to display in the object. If more than one dataset
is to be specified, then a tuple can be used if all of the datasets
conform to ARM standards. Otherwise, a dict with a key corresponding
Expand All @@ -90,29 +90,29 @@ class with this set to None will create a new figure handle. See the
Keyword arguments passed to :func:`plt.figure`.
"""
def __init__(self, arm_obj, subplot_shape=(1,), ds_name=None,
def __init__(self, obj, subplot_shape=(1,), ds_name=None,
subplot_kw=None, **kwargs):
if isinstance(arm_obj, xr.Dataset):
if arm_obj.act.datastream is not None:
self._arm = {arm_obj.act.datastream: arm_obj}
if isinstance(obj, xr.Dataset):
if obj.act.datastream is not None:
self._arm = {obj.act.datastream: obj}
elif ds_name is not None:
self._arm = {ds_name: arm_obj}
self._arm = {ds_name: obj}
else:
warnings.warn(("Could not discern datastream" +
"name and dict or tuple were " +
"not provided. Using default" +
"name of act_datastream!"), UserWarning)

self._arm = {'act_datastream': arm_obj}
self._arm = {'act_datastream': obj}

# Automatically name by datastream if a tuple of object is supplied
if isinstance(arm_obj, tuple):
if isinstance(obj, tuple):
self._arm = {}
for arm_objs in arm_obj:
self._arm[arm_objs.act.datastream] = arm_objs
for objs in obj:
self._arm[objs.act.datastream] = objs

if isinstance(arm_obj, dict):
self._arm = arm_obj
if isinstance(obj, dict):
self._arm = obj

self.fields = {}
self.ds = {}
Expand Down Expand Up @@ -307,8 +307,8 @@ class TimeSeriesDisplay(Display):
until add_subplots or plots is called.
"""
def __init__(self, arm_obj, subplot_shape=(1,), ds_name=None, **kwargs):
super().__init__(arm_obj, subplot_shape, ds_name, **kwargs)
def __init__(self, obj, subplot_shape=(1,), ds_name=None, **kwargs):
super().__init__(obj, subplot_shape, ds_name, **kwargs)

def day_night_background(self, dsname=None, subplot_index=(0, )):
"""
Expand Down Expand Up @@ -969,8 +969,8 @@ class and has therefore has the same attributes as that class.
WindDisplay = act.plotting.WindRoseDisplay(sonde_ds, figsize=(8,10))
"""
def __init__(self, arm_obj, subplot_shape=(1,), ds_name=None, **kwargs):
super().__init__(arm_obj, subplot_shape, ds_name,
def __init__(self, obj, subplot_shape=(1,), ds_name=None, **kwargs):
super().__init__(obj, subplot_shape, ds_name,
subplot_kw=dict(projection='polar'), **kwargs)

def set_thetarng(self, trng=(0., 360.), subplot_index=(0,)):
Expand Down Expand Up @@ -1155,14 +1155,14 @@ class and has therefore has the same attributes as that class.
plt.show()
"""
def __init__(self, arm_obj, subplot_shape=(1,), ds_name=None, **kwargs):
def __init__(self, obj, subplot_shape=(1,), ds_name=None, **kwargs):
# We want to use our routine to handle subplot adding, not the main
# one
if not METPY_AVAILABLE:
raise ImportError("MetPy need to be installed on your system to " +
"make Skew-T plots.")
new_kwargs = kwargs.copy()
super().__init__(arm_obj, None, ds_name,
super().__init__(obj, None, ds_name,
subplot_kw=dict(projection='skewx'), **new_kwargs)

# Make a SkewT object for each subplot
Expand Down
2 changes: 1 addition & 1 deletion act/tests/test_plotting.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import matplotlib
matplotlib.use('Agg')
import act.io.armfiles as arm
import act.discovery.get_files as get_data
import act.discovery.get_armfiles as get_data
import act.tests.sample_files as sample_files
import act.corrections.ceil as ceil
import pytest
Expand Down
2 changes: 1 addition & 1 deletion docs/source/API/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ API Reference
:Release: |version|
:Date: |today|

This shows the details of the API of the ARM Community Toolkit. Documentation
This shows the details of the API of the Atmospheric data Community Toolkit. Documentation
of each procedure in each module is provided as a reference.

.. toctree::
Expand Down
18 changes: 9 additions & 9 deletions docs/source/CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Types of Contributions
Report Bugs
~~~~~~~~~~~

Report bugs at https://github.com/AdamTheisen/arm-community-toolkit/issues.
Report bugs at https://github.com/ANL-DIGR/ACT/issues

If you are reporting a bug, please include:

Expand All @@ -35,14 +35,14 @@ is open to whoever wants to implement it.
Write Documentation
~~~~~~~~~~~~~~~~~~~

ARM Community Toolkit could always use more documentation, whether
as part of the official ARM Community Toolkit docs, in docstrings,
Atmospheric data Community Toolkit could always use more documentation, whether
as part of the official Atmospheric data Community Toolkit docs, in docstrings,
or even on the web in blog posts, articles, and such.

Submit Feedback
~~~~~~~~~~~~~~~

The best way to send feedback is to file an issue at https://github.com/AdamTheisen/arm-community-toolkit/issues.
The best way to send feedback is to file an issue at https://github.com/ANL-DIGR/ACT/issues

If you are proposing a feature:

Expand All @@ -57,7 +57,7 @@ Get Started!
Ready to contribute? Here's are a few steps we will go over for contributing
to `act`.

1. Fork the `arm-community-toolkit` repo on GitHub and clone your fork locally.
1. Fork the `ACT` repo on GitHub and clone your fork locally.

2. Install your local copy into an Anaconda environment. Assuming you have
anaconda installed.
Expand All @@ -75,7 +75,7 @@ to `act`.

Fork and Cloning the ACT Repository
-----------------------------------
To start, you will first fork the `arm-community-toolkit` repo on GitHub by
To start, you will first fork the `ACT` repo on GitHub by
clicking the fork icon button found on the main page here:

- https://github.com/ANL-DIGR/ACT
Expand Down Expand Up @@ -200,7 +200,7 @@ An example:
"""
Returns `xarray.Dataset` with stored data and metadata from a
user-defined query of ARM-standard netCDF files from a single
user-defined query of standard netCDF files from a single
datastream.
Parameters
Expand Down Expand Up @@ -299,7 +299,7 @@ An example:
def test_correct_ceil():
# Make a fake ARM dataset to test with, just an array with 1e-7
# Make a fake dataset to test with, just an array with 1e-7
# for half of it.
fake_data = 10 * np.ones((300, 20))
fake_data[:, 10:] = -1
Expand Down Expand Up @@ -410,7 +410,7 @@ Before you submit a pull request, check that it meets these guidelines:
your new functionality into a function with a docstring, and add the
feature to the list in README.rst.
3. The pull request should work for Python 2.7, 3.6, 3.7 for PyPy. Check
https://travis-ci.org/AdamTheisen/arm-community-toolkit/pull_requests
https://travis-ci.org/ANL-DIGR/ACT
and make sure that the tests pass for all supported Python versions.

After creating a pull request through GitHub, and outside checker TravisCI
Expand Down
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# ARM Community Toolkit documentation build configuration file, created by
# Atmospheric data Community Toolkit documentation build configuration file, created by
# sphinx-quickstart on Thu Jun 28 12:35:56 2018.
#
# This file is execfile()d with the current directory set to its
Expand Down Expand Up @@ -192,7 +192,7 @@
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'act', 'Atmospheric Community Toolkit Documentation',
author, 'act', 'Package for connecting ARM users to the data',
author, 'act', 'Package for connecting users to the data',
'Miscellaneous'),
]

Expand Down
2 changes: 1 addition & 1 deletion docs/source/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Start by importing Atmospheric Community Toolkit.
import act
The Atmospheric Community Toolkit comes with modules for loading ARM datasets.
The Atmospheric data Community Toolkit comes with modules for loading ARM datasets.
The main dataset object that is used in ACT is based off of an extension of
the `xarray.Dataset<http://xarray.pydata.org/en/stable/generated/xarray.Dataset.html>`
object. In particular ACT adds a DatasetAccessor that stores the additional
Expand Down

0 comments on commit 5e7709c

Please sign in to comment.