Skip to content

Commit d67d75c

Browse files
committed
first commit for nddata object
1 parent a1d6a2b commit d67d75c

2 files changed

Lines changed: 34 additions & 0 deletions

File tree

astropy/nddata/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Licensed under a 3-clause BSD style license - see LICENSE.rst
2+
3+
from .nddata import NDData
4+
"""_NDData is is a module that manages n-dimensional array based data (e.g. CCD images, IFU Data, optical spectra, ...)"""

astropy/nddata/nddata.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Licensed under a 3-clause BSD style license - see LICENSE.rst
2+
3+
class NDData(object):
4+
"""Class to store array type data.
5+
`NDData` provides a superclass for all array based data.
6+
7+
Initialize an NDData object with data
8+
Parameters
9+
----------
10+
data : `numpy.array`
11+
n-dimensional array containing the n-dimensional data
12+
error: `numpy.array`, optional
13+
n-dimensional array containing the error of the data
14+
mask: `numpy.array`, optional
15+
n-dimensional array masking the data (suggested dtype=`bool`)
16+
wcs: `astropy.wcs`, optional
17+
WCS-object containing the world coordinate algorithms for the adta
18+
meta: `dict`-like object, optional
19+
contains meta data for the n-dimensional data
20+
units: `astropy.units`, optional
21+
describing the units of the data
22+
23+
"""
24+
def __init__(self, data, error=None, mask=None, wcs=None, meta=None, units=None):
25+
self.data = data
26+
self.error = error
27+
self.mask = mask
28+
self.wcs = wcs
29+
self.meta = meta
30+
self.units = units

0 commit comments

Comments
 (0)