filename_metadata#
- gwpy.io.cache.filename_metadata(filename: FileSystemPath) tuple[str, str, Segment][source]#
Return metadata parsed from a filename following LIGO-T010150.
This method is lenient with regards to integers in the GPS start time of the file, as opposed to
gwdatafind.utils.filename_metadata, which is strict.- Parameters:
- filename
str the path name of a file
- filename
- Returns:
- obs
str the observatory metadata
- tag
str the file tag
- segment
gwpy.segments.Segment the GPS
[float, float)interval for this file
- obs
Notes
LIGO-T010150 declares a file naming convention that includes documenting the GPS start integer and integer duration of a file, see that document for more details.
Examples
>>> from gwpy.io.cache import filename_metadata >>> filename_metadata("A-B-0-1.txt") ('A', 'B', Segment(0, 1)) >>> filename_metadata("A-B-0.456-1.345.txt") ("A", "B", Segment(0.456, 1.801))