Skip to content

Commit

Permalink
Merge pull request #69 from mwcraig/docs
Browse files Browse the repository at this point in the history
Thanks everyone for the feedback!
  • Loading branch information
mwcraig committed May 31, 2014
2 parents d358277 + cea9df0 commit f0351f4
Show file tree
Hide file tree
Showing 13 changed files with 863 additions and 90 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ matrix:
env: ASTROPY_VERSION=development NUMPY_VERSION=$LATEST_NUMPY_STABLE SETUP_CMD='test --coverage'

before_install:
- pip install --upgrade setuptools
- pip install setuptools
- pip install --upgrade pip
- pip install wheel
- if [[ $SETUP_CMD == build_sphinx* ]]; then sudo apt-get update; sudo apt-get install graphviz; fi
Expand All @@ -81,7 +81,7 @@ install:
# Build development astropy from source -- requires cython. Cython does not
# depend on numpy so we don't care where we get the wheel from.
- if [[ $ASTROPY_VERSION == development ]]; then $PIP_WHEEL_FLEX_NUMPY cython; fi
- if [[ $ASTROPY_VERSION == development ]]; then pip -q install git+http://github.com/astropy/astropy.git#egg=astropy; fi
- if [[ $ASTROPY_VERSION == development ]]; then git clone http://github.com/astropy/astropy.git astropy; cd astropy; git submodule update --init; python setup.py install; cd ..; fi

# Documentation build has a couple of additional requirements.
- if [[ $SETUP_CMD == build_sphinx* ]]; then $PIP_WHEEL_FLEX_NUMPY sphinx>=1.2; fi
Expand Down
6 changes: 5 additions & 1 deletion ccdproc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,13 @@
except ImportError:
__githash__ = ''

# set up the test command
# set up namespace
from .ccdproc import *
from .ccddata import *
from .combiner import *


# set up the test command
def _get_test_runner():
from astropy.tests.helper import TestRunner
return TestRunner(__path__[0])
Expand Down
25 changes: 14 additions & 11 deletions ccdproc/ccddata.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
electron = u.def_unit('electron')
photon = u.photon

__all__ = ['CCDData', 'electron']


class CCDData(NDData):

Expand All @@ -30,12 +32,13 @@ class CCDData(NDData):
Parameters
-----------
data : `~numpy.ndarray` or `~astropy.nddata.NDData`
The actual data contained in this `NDData` object. Not that this
will always be copies by *reference* , so you should make copy
the `data` before passing it in if that's the desired behavior.
data : `~numpy.ndarray` or :class:`~astropy.nddata.NDData`
The actual data contained in this `~astropy.nddata.NDData` object.
Note that this will always be copies by *reference* , so you should
make copy the `data` before passing it in if that's the desired
behavior.
uncertainty : `~astropy.nddata.NDUncertainty`, optional
uncertainty : `~astropy.nddata.StdDevUncertainty`, optional
Uncertainties on the data.
mask : `~numpy.ndarray`, optional
Expand Down Expand Up @@ -66,13 +69,13 @@ class CCDData(NDData):
of this particular object. e.g., creation date, unique identifier,
simulation parameters, exposure time, telescope name, etc.
unit : `astropy.units.UnitBase` instance or str, optional
unit : `~astropy.units.Unit` instance or str, optional
The units of the data.
Raises
------
ValueError
If the `uncertainty` or `mask` inputs cannot be broadcast (e.g., match
If the `uncertainty` or `.mask` inputs cannot be broadcast (e.g., match
shape) onto `data`.
Notes
Expand All @@ -88,8 +91,8 @@ class CCDData(NDData):
>>> np.asarray(x)
array([1, 2, 3])
If the `NDData` object has a `mask`, `numpy.asarray` will return a
Numpy masked array.
If the `~astropy.nddata.NDData` object has a `mask`, `numpy.asarray` will
return a Numpy masked array.
This is useful, for example, when plotting a 2D image using
matplotlib::
Expand Down Expand Up @@ -247,7 +250,7 @@ def subtract(self, other):

def fits_ccddata_reader(filename, hdu=0, unit=None, **kwd):
"""
Generate a CCDData object from a FITS file
Generate a CCDData object from a FITS file.
Parameters
----------
Expand Down Expand Up @@ -289,7 +292,7 @@ def fits_ccddata_reader(filename, hdu=0, unit=None, **kwd):

def fits_ccddata_writer(ccd_data, filename, **kwd):
"""
Write CCDData object to FITS file
Write CCDData object to FITS file.
Parameters
----------
Expand Down
Loading

0 comments on commit f0351f4

Please sign in to comment.