Last change
on this file since 41 was 41, checked in by JohnLightfoot, 10 years ago |
copy numpy arrays to avoid misleading results
|
File size:
996 bytes
|
Line | |
---|
1 | class Axis(object):
|
---|
2 | """Class to hold axis information.
|
---|
3 | """
|
---|
4 | def __init__(self, data, title='', units=''):
|
---|
5 | self.data = data.copy()
|
---|
6 | self.title = title
|
---|
7 | self.units = units
|
---|
8 |
|
---|
9 |
|
---|
10 | class Cube(object):
|
---|
11 | """Class to hold 3d image, with axes, units, title, etc.
|
---|
12 | """
|
---|
13 | def __init__(self, data, axes=[], title='', units=''):
|
---|
14 | self.data = data.copy()
|
---|
15 | self.axes = axes
|
---|
16 | self.title = title
|
---|
17 | self.units = units
|
---|
18 |
|
---|
19 |
|
---|
20 | class Image(object):
|
---|
21 | """Class to hold 2d image, with axes, units, title, etc.
|
---|
22 | """
|
---|
23 | def __init__(self, data, axes=[], title='', units=''):
|
---|
24 | self.data = data.copy()
|
---|
25 | self.axes = axes
|
---|
26 | self.title = title
|
---|
27 | self.units = units
|
---|
28 |
|
---|
29 |
|
---|
30 | class Spectrum(object):
|
---|
31 | """Class to hold 1d spectrum, with axis, units, title, etc.
|
---|
32 | """
|
---|
33 | def __init__(self, data, axis=None, title='', units=''):
|
---|
34 | self.data = data.copy()
|
---|
35 | self.axis = axis
|
---|
36 | self.title = title
|
---|
37 | self.units = units
|
---|
Note:
See
TracBrowser
for help on using the repository browser.