Package glue :: Module lal :: Class CacheEntry
[hide private]
[frames] | no frames]

Class CacheEntry

source code

                object --+    
lal.utils.cache.CacheEntry --+

Instance Methods [hide private]
__init__(self, *args, **kwargs)
Intialize a CacheEntry object.
source code

Inherited from lal.utils.cache.CacheEntry: __eq__, __ge__, __gt__, __hash__, __le__, __lt__, __str__

Inherited from object: __delattr__, __format__, __getattribute__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Methods [hide private]

Inherited from lal.utils.cache.CacheEntry: from_T050017

Class Variables [hide private]

Inherited from lal.utils.cache.CacheEntry (private): _regex, _url_regex

Properties [hide private]

Inherited from lal.utils.cache.CacheEntry: segmentlistdict, url

Inherited from object: __class__

Method Details [hide private]

__init__(self, *args, **kwargs)

source code 

Intialize a CacheEntry object. The arguments can take two forms: a single string argument, which is interpreted and parsed as a line from a LAL cache file, or four arguments used to explicitly initialize the observatory, description, segment and URL in that order. When parsing a single line of text from a LAL cache, an optional key-word argument "coltype" can be provided to set the type the start and durations are parsed as. The default is lal.LIGOTimeGPS.


>>> c = CacheEntry("H1", "S5", segments.segment(815901601, 815902177.5), "file://localhost/home/kipp/tmp/1/H1-815901601-576.xml")
>>> print(c.segment)
[815901601 ... 815902177.5)
>>> print(str(c))
H1 S5 815901601 576.5 file://localhost/home/kipp/tmp/1/H1-815901601-576.xml
>>> c = CacheEntry("H1 S5 815901601 576.5 file://localhost/home/kipp/tmp/1/H1-815901601-576.xml")
>>> print(c.segment)
[815901601 ... 815902177.5)
>>> print(CacheEntry("H1 S5 815901601 576.5 file://localhost/home/kipp/tmp/1/H1-815901601-576.xml", coltype = float).segment)
[815901601.0 ... 815902177.5)

See also the .from_T050017() class method for an alternative initialization mechanism.

Overrides: object.__init__
(inherited documentation)