Coverage for src / sgn_gwframe / base.py: 100.0%
6 statements
« prev ^ index » next coverage.py v7.13.2, created at 2026-02-12 13:29 -0800
« prev ^ index » next coverage.py v7.13.2, created at 2026-02-12 13:29 -0800
1"""Utility functions for gravitational wave frame I/O."""
3# Copyright (C) 2009-2013 Kipp Cannon, Chad Hanna, Drew Keppel
4# Copyright (C) 2024 Becca Ewing, Yun-Jing Huang
6from __future__ import annotations
8import os
11def from_T050017(url): # noqa: N802
12 """
13 Parse a URL in the style of T050017-00.
14 """
15 filename, _ = os.path.splitext(os.path.basename(url))
16 obs, desc, start, dur = filename.split("-")
17 return obs, desc, int(start), int(dur)