CCDData¶
-
class
ccdproc.
CCDData
(*args, **kwd)[source]¶ Bases:
astropy.nddata.NDDataArray
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
orndarray
,optional Uncertainties on the data.
mask :
ndarray
, optionalMask 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 andTrue
when it is not (like Numpy masked arrays). Ifdata
is a numpy masked array, providingmask
here will causes the mask from the masked array to be ignored.flags :
ndarray
orFlagCollection
, optionalFlags giving information about each pixel. These can be specified either as a Numpy array of any type with a shape matching that of the data, or as a
FlagCollection
instance which has a shape matching that of the data.wcs :
WCS
object, optionalWCS-object containing the world coordinate system for the data.
meta :
dict
-like object, optionalMetadata for this object. “Metadata” here means all information that is included with this object but not part of any other attribute of this particular object. e.g., creation date, unique identifier, simulation parameters, exposure time, telescope name, etc.
unit :
Unit
instance or str, optionalThe units of the data.
Raises: ValueError
If the
uncertainty
ormask
inputs cannot be broadcast (e.g., match shape) ontodata
.Notes
NDData
objects can be easily converted to a regular Numpy array usingnumpy.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 amask
,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
data
dtype
header
meta
shape
size
uncertainty
unit
Methods Summary
Attributes Documentation
-
data
¶
-
dtype
¶
-
header
¶
-
meta
¶
-
shape
¶
-
size
¶
-
uncertainty
¶
-
unit
¶
Methods Documentation
-