astropy/ccdproc — pull request #44 by mwcraig (2014-04-27 22:31:21+00:00)
Title: Override basic arithmetic operators

This pull request overrides the methods ``NDData.add``, ``NDData.subtract``, ``NDData.multiply`` and ``NDData.divide`` to allow ``scalar * ccd_data_object`` where ``scalar`` can be either a plain number or a ``astropy.units.Quantity``. The case of ``ccd_data_object1 * ccd_data_object2`` is passed to ``NDData``.

Error is properly propagated in the scalar cases (propagation is handled by ``NDData`` in the other case).

If the operand is a scalar then the result's metadata is that of the ccd_data object. If both operands are ``CCDData`` objects then the result's metadata is ``None`` because there is no way for the basic operations to know what the appropriate metadata should be.