Skip to content

Commit

Permalink
Merge pull request #221 from bsipocz/docs_enable_nitpick
Browse files Browse the repository at this point in the history
Enabling docs nitpicky mode
  • Loading branch information
mwcraig committed Aug 5, 2015
2 parents c5b89d4 + c075b9b commit beda09a
Show file tree
Hide file tree
Showing 8 changed files with 103 additions and 88 deletions.
23 changes: 11 additions & 12 deletions ccdproc/ccddata.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from astropy import log
from astropy.wcs import WCS

from .utils.collections import CaseInsensitiveOrderedDict

__all__ = ['CCDData']

Expand All @@ -33,18 +32,18 @@ class CCDData(NDDataArray):
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
make copy the ``data`` before passing it in if that's the desired
behavior.
uncertainty : `~astropy.nddata.StdDevUncertainty` or `~numpy.ndarray`,
optional Uncertainties on the data.
mask : `~numpy.ndarray`, optional
Mask for the data, given as a boolean Numpy array with a shape
matching that of the data. The values must be ``False`` where
the data is *valid* and ``True`` when it is not (like Numpy
masked arrays). If `data` is a numpy masked array, providing
`mask` here will causes the mask from the masked array to be
matching that of the data. The values must be `False` where
the data is *valid* and `True` when it is not (like Numpy
masked arrays). If ``data`` is a numpy masked array, providing
``mask`` here will causes the mask from the masked array to be
ignored.
flags : `~numpy.ndarray` or `~astropy.nddata.FlagCollection`, optional
Expand All @@ -68,13 +67,13 @@ class CCDData(NDDataArray):
Raises
------
ValueError
If the `uncertainty` or `.mask` inputs cannot be broadcast (e.g., match
shape) onto `data`.
If the ``uncertainty`` or ``mask`` inputs cannot be broadcast (e.g.,
match shape) onto ``data``.
Notes
-----
`NDData` objects can be easily converted to a regular Numpy array
using `numpy.asarray`
`~astropy.nddata.NDData` objects can be easily converted to a regular
Numpy array using `numpy.asarray`
For example::
Expand All @@ -84,7 +83,7 @@ class CCDData(NDDataArray):
>>> np.asarray(x)
array(NDData([1, 2, 3]), dtype=object)
If the `~astropy.nddata.NDData` object has a `mask`, `numpy.asarray` will
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
Expand Down Expand Up @@ -240,7 +239,7 @@ def _ccddata_arithmetic(self, other, operation, scale_uncertainty=False):
"""
Perform the common parts of arithmetic operations on CCDData objects
This should only be called when `other` is a Quantity or a number
This should only be called when ``other`` is a Quantity or a number
"""
# THE "1 *" IS NECESSARY to get the right result, at least in
# astropy-0.4dev. Using the np.multiply, etc, methods with a Unit
Expand Down
16 changes: 9 additions & 7 deletions ccdproc/combiner.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Combiner(object):
Raises
------
TypeError
If the `ccd_list` are not `~ccdproc.CCDData` objects, have different
If the ``ccd_list`` are not `~ccdproc.CCDData` objects, have different
units, or are different shapes
Notes
Expand Down Expand Up @@ -148,11 +148,13 @@ def scaling(self):
----------
scale : function or array-like or None, optional
Images are multiplied by scaling prior to combining them. Scaling
may be either a function, which will be applied to each image
to determine the scaling factor, or a list or array whose length
is the number of images in the `Combiner`. Default is ``None``.
Images are multiplied by scaling prior to combining
them. Scaling may be either a function, which will be applied to
each image to determine the scaling factor, or a list or array
whose length is the number of images in the `~ccdproc.Combiner`.
Default is `None`.
"""

return self._scaling

@scaling.setter
Expand Down Expand Up @@ -257,8 +259,8 @@ def median_combine(self, median_func=ma.median, scale_to=None):
Parameters
----------
median_func : function, optional
Function that calculates median of a ``numpy.ma.masked_array``.
Default is to use ``np.ma.median`` to calculate median.
Function that calculates median of a `~numpy.ma.masked_array`.
Default is to use `numpy.ma.median` to calculate median.
scale_to : float, optional
Scaling factor used in the average combined image. If given,
Expand Down
Loading

0 comments on commit beda09a

Please sign in to comment.