Home | Trees | Indices | Help |
|
---|
|
object --+ | FrameCache
FrameCache is a transparent interface to LSC data. The user provides a LAL- formatted cache file and the returned FrameCache object allows repeated queries for channels and time, even across frame files. It also supports smart, lazy local caching. Limitations: It only works for one-dimensional time-series data. Constructor: FrameCache(cache_entries=None, scratchdir=None, verbose=False) Inputs: cache is a list of glue.lal.CacheEntry objects or a glue.lal.Cache. Data will be retrieved from the frame files described within. Scratchdir determines where to locally cache frames. If None, no caching is performed. Example: >>> from glue import lal >>> from pylal import frutils >>> c = lal.Cache.fromfile(open("test.cache")) >>> d = frutils.FrameCache(c, scratchdir="/tmp", verbose=True) >>> data = d.fetch("H1:LSC-STRAIN", 861417967, 861417969) Copying /Users/nvf/temp/H-H1_RDS_C03_L2-861417967-128.gwf --> /tmp/H-H1_RDS_C03_L2-861417967-128.gwf. >>> print(data) [ 1.68448009e-16 1.69713183e-16 1.71046196e-16 ..., 1.80974629e-16 1.80911765e-16 1.80804879e-16] {'dt': 6.103515625e-05, 'segments': [segment(861417967, 861417969)], 'comments': [], 'name': 'H1:LSC-STRAIN'} >>> exit() Removing /tmp/H-H1_RDS_C03_L2-861417967-128.gwf.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|||
Inherited from |
|
Initializes interface to frame data. See .__class__.__doc__
|
Internal method to actually retrieve and return data as TimeSeries, assuming that self._framefiles is all set. Does not check boundaries. |
Removes files from local scratch space based on start, end pairs. Silently ignores non-existent times. Remove if file end is between start and end. This is biased to prevent cache misses for future fetches being in the future. (Processing frames in chronological order) |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue Dec 12 01:21:42 2017 | http://epydoc.sourceforge.net |