Multiple optimisations for TimeSeries methods
This PR introduces a number of critical optimisations for routines in GWpy. The summary is as follows:
-
gwpy.segmentsis now only imported at the function level forChannelobjects and allArraysub-classes (include, e.g,TimeSeries) - this import is slow because it relies ongwpy.table.ligolwimports - `TimeSeries.read(format='framecpp') now intelligently handles accessing the TOC for a frame, and does it as seldom as possible
-
TimeSeries.spectrogramnow calculates a single window function up-front, rather than passing the default argument and havingscipyrecalculate the window function every timewelchis called -
TimeSeries.read(cache)will now try to uselalframe-based serial access for up to 4 channels sincelalframeis 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.