Skip to content

Conversation

@mwcraig
Copy link
Member

@mwcraig mwcraig commented Apr 27, 2014

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.

mwcraig added a commit that referenced this pull request Apr 29, 2014
Override basic arithmetic operators
@mwcraig mwcraig merged commit 5edcac5 into astropy:master Apr 29, 2014
@mwcraig mwcraig deleted the mul-etc-take-2 branch April 30, 2014 02:08
mwcraig pushed a commit to mwcraig/ccdproc that referenced this pull request Jun 4, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant