read_cache#

gwpy.io.cache.read_cache(cachefile: Readable, coltype: GpsParser = <class 'lal.LIGOTimeGPS'>, sort: Callable[[str], Any] | None = None, segment: Segment | None = None, *, strict: bool = False) list[str][source]#

Read a LAL- or FFL-format cache file as a list of file paths.

Parameters:
cachefilestr, pathlib.Path, file

Input file or file path to read.

coltypeLIGOTimeGPS, int, optional

Type for GPS times.

sortcallable, optional

A callable key function by which to sort the output list of file paths

segmentgwpy.segments.Segment, optional

A GPS [start, stop) interval, if given only files overlapping this interval will be returned.

strictbool, optional

If False warn about entries that don’t follow the LIGO-T010150 standard, then skip them; if True all errors are raised as exceptions.

Returns:
pathslist of str

A list of file paths as read from the cache file.