Bases: astropy.nddata.nddata.NDData
A class describing basic CCD data
The CCDData class is based on the NDData object and includes a data array, uncertainty frame, mask frame, meta data, units, and WCS information for a single CCD image.
Parameters: |
uncertainty : StdDevUncertainty or ndarray, optional
mask : ndarray, optional
flags : ndarray or FlagCollection, optional
wcs : undefined, optional
meta : dict-like object, optional
unit : Unit instance or str, optional
|
---|---|
Raises: | ValueError
|
Notes
NDData objects can be easily converted to a regular Numpy array using numpy.asarray
For example:
>>> from astropy.nddata import NDData
>>> import numpy as np
>>> x = NDData([1,2,3])
>>> np.asarray(x)
array([1, 2, 3])
If the 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:
>>> from astropy.nddata import NDData
>>> from matplotlib import pyplot as plt
>>> x = NDData([[1,2,3], [4,5,6]])
>>> plt.imshow(x)
Attributes Summary
header | |
meta | |
uncertainty |
Methods Summary
add(other) | |
copy() | Return a copy of the CCDData object. |
divide(other) | |
multiply(other) | |
subtract(other) | |
to_hdu() | Creates an HDUList object from a CCDData object. |
Attributes Documentation
Methods Documentation