Cache manipulation (gwpy.io.cache)#

Input/Output utilities for GW Cache files.

A cache file is a specially-formatted ASCII file that contains file paths and associated metadata for those files, designed to make identifying relevant data, and sieving large file lists, easier for the user.

Functions#

cache_segments(*caches)

Return the segments of data covered by entries in the cache(s).

file_segment(filename)

Return the data segment for a filename following LIGO-T010150.

filename_metadata(filename)

Return metadata parsed from a filename following LIGO-T010150.

find_contiguous(*caches)

Separate one or more cache entry lists into time-contiguous sub-lists.

flatten(*caches)

Flatten a nested list of cache entries.

is_cache(cache)

Return True if cache is a readable cache file or object.

is_cache_entry(path)

Return True if path can be represented as a cache entry.

read_cache(cachefile, coltype, sort, ...)

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

read_cache_entry(line, gpstype)

Read a file path from a line in a cache file.

sieve(cache, segment, *[, strict])

Filter the cache to find those entries that overlap segment.

write_cache(cache, fobj, *[, format])

Write a list of cache entries to a file.