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:
-
Arraynow inherits fromastropy.units.Quantityrather than fromnumpy.ndarray,- all unit handing is now much easier, with most of it handled directly by
Quantity, - the
unitproperty 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
dataproperty has been removed in favour of theQuantity.valueproperty.datawas a bad choice to begin with as it overrode anumpy.ndarrayproperty,
- all unit handing is now much easier, with most of it handled directly by
-
Array2Dnow inherits fromSeries, - the
timesandfrequenciesindexes of theTimeSeries,Spectrum, andSpectrogramclasses are now simplyQuantityarrays, 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).