Multiple optimisations for TimeSeries methods
This PR introduces a number of critical optimisations for routines in GWpy. The summary is as follows:
-
gwpy.segments
is now only imported at the function level forChannel
objects and allArray
sub-classes (include, e.g,TimeSeries
) - this import is slow because it relies ongwpy.table.ligolw
imports - `TimeSeries.read(format='framecpp') now intelligently handles accessing the TOC for a frame, and does it as seldom as possible
-
TimeSeries.spectrogram
now calculates a single window function up-front, rather than passing the default argument and havingscipy
recalculate the window function every timewelch
is called -
TimeSeries.read(cache)
will now try to uselalframe
-based serial access for up to 4 channels sincelalframe
is much faster thanframeCPP.py
- this is set ingwpy.timeseries.io.cache.MAX_LALFRAME_CHANNELS
Additionally, a number of bugs have been squashed as they were discovered.