Package pylal :: Package dq :: Module dqFrameUtils :: Class FrameCacheEntry
[hide private]
[frames] | no frames]

Class FrameCacheEntry

source code

         ??-602 --+    
                  |    
glue.lal.CacheEntry --+
                      |
                     FrameCacheEntry

An object representing one line in a frame cache file.

Each line in a frame cache identifies multiple files, and the line consists of six columns of white-space delimited text.

The first column, "observatory", generally stores the name of an observatory site or one or more instruments (preferably delimited by ",", but often there is no delimiter between instrument names).

The second column, "description", stores a short string tag that is usually all capitals with "_" separating components, in the style of the description part of the LIGO-Virgo frame filename format.

The third and fourth columns store the start time and stop time in GPS seconds of the interval spanned by the file identified by the cache line.

The fifth column stored the duration of each frame identified in the cache line.

The sixth (last) column stores the file's URL.

The values for these columns are stored in the .observatory, .description, .segment and .url attributes, respectively. The .segment attribute stores a glue.segments.segment object describing the interval spanned by the file. Any of these attributes except the URL is allowed to be None.

Instance Methods [hide private]
 
__init__(self, *args, **kwargs)
Intialize a FrameCacheEntry object.
source code
 
__str__(self)
Convert the FrameCacheEntry to a string in the format of a line in a frame cache.
source code
 
__cmp__(self, other)
Compare two FrameCacheEntry objects by observatory, then description, then segment, then duration, then URL.
source code
 
get_files(self)
Return Find all files described by this FrameCacheEntry.
source code
Class Methods [hide private]
 
from_T050017(cls, url, coltype=LIGOTimeGPS)
Parse a URL in the style of T050017-00 into a FrameCacheEntry.
source code
Class Variables [hide private]
  _regex = re.compile(r"\A\s*(?P<obs>\S+)\s+(?P<dsc>\S+)\s+(?P<s...
  _url_regex = re.compile(r"\A((.*/)*(?P<obs>[^/]+)-(?P<dsc>[^/]...
Method Details [hide private]

__init__(self, *args, **kwargs)
(Constructor)

source code 

Intialize a FrameCacheEntry object. The arguments can take two forms: a single string argument, which is interpreted and parsed as a line from a frame 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 frame cache, an optional key-word argument "coltype" can be provided to set the type the start, end and durations are parsed as. The default is glue.lal.LIGOTimeGPS.

Overrides: glue.lal.CacheEntry.__init__

__str__(self)
(Informal representation operator)

source code 

Convert the FrameCacheEntry to a string in the format of a line in a frame cache. Used to write the FrameCacheEntry to a file.

from_T050017(cls, url, coltype=LIGOTimeGPS)
Class Method

source code 

Parse a URL in the style of T050017-00 into a FrameCacheEntry. The T050017-00 file name format is, essentially,

observatory-description-start-dur.ext


Class Variable Details [hide private]

_regex

Value:
re.compile(r"\A\s*(?P<obs>\S+)\s+(?P<dsc>\S+)\s+(?P<strt>\S+)\s+(?P<en\
d>\S+)\s+(?P<dur>\S+)\s+(?P<url>\S+)\s*\Z")

_url_regex

Value:
re.compile(r"\A((.*/)*(?P<obs>[^/]+)-(?P<dsc>[^/]+)-(?P<strt>[^/]+)-(?\
P<dur>[^/\.]+)\.[^/]+)\Z")