Rebuild of Array and sub-classes
This PR introduces a complete re-build of the Array
class and all sub-classes, including TimeSeries
, Spectrum
, and Spectrogram
. The changes are (at least) as follows:
-
Array
now inherits fromastropy.units.Quantity
rather than fromnumpy.ndarray
,- all unit handing is now much easier, with most of it handled directly by
Quantity
, - the
unit
property cannot be set for an array that already has a unit, a notice has been added to the exception message to ask the user to use theArray.to()
method, which properly converts between units, - the
data
property has been removed in favour of theQuantity.value
property.data
was a bad choice to begin with as it overrode anumpy.ndarray
property,
- all unit handing is now much easier, with most of it handled directly by
-
Array2D
now inherits fromSeries
, - the
times
andfrequencies
indexes of theTimeSeries
,Spectrum
, andSpectrogram
classes are now simplyQuantity
arrays, rather thanSeries
, this means that they don't have the extra metadata they used to (epoch
,channel
,name
),
All downstream codes have been modified to handle the new base classes.
This fixes #66 (closed).