igwn-segments
Representations of semi-open intervals
What it is and what it does
igwn-segments provides three core data structures—segment, segmentlist, and segmentlistdict—for working with semi-open intervals. It was forked in 2024 from ligo-segments and is designed to represent time windows or ranges, with built-in operations for combining, querying, and manipulating collections of intervals. The package has no runtime dependencies and is marked Production/Stable, supporting Python 3.9 through 3.14.
The library is primarily used in gravitational-wave physics and astronomy research, where time-interval representation is fundamental. It offers a clean API for interval arithmetic without requiring external dependencies, making it lightweight for projects that need interval logic without heavy computational overhead.
Use it for:
- Represent and query detector uptime windows or data-quality segments in gravitational-wave observatories.
- Manage overlapping time intervals for event selection and filtering in physics data analysis.
- Combine or intersect multiple segmentlists to identify common valid time ranges across datasets.
- Store and retrieve interval metadata using segmentlistdict for labeled segment collections.
- Build interval-based filtering logic in scientific pipelines without external dependencies.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides segment, segmentlist, and segmentlistdict objects for representing and manipulating semi-open intervals in Python.
Yes, if you work with semi-open intervals or time windows in scientific or data-analysis code. The package is stable, dependency-free, and widely used in gravitational-wave research. Install friction is moderate due to compiled wheels, but pre-built binaries exist for common platforms. The copyleft license is a blocker only if you need to distribute proprietary code; for internal or open-source use, it poses no barrier. Maintenance is aging (207 days since last release), so verify active support if you need ongoing updates.
Install
igwn-segments on PyPI
pip
pip install igwn-segmentsuv
uv add igwn-segmentspoetry
poetry add igwn-segmentsInstalling igwn-segments
Before you install
Medium install friction due to compiled wheels across multiple platforms (Python 3.10–3.13, macOS, Linux variants, musl). Last release 207 days ago; maintenance status is aging but package is marked Production/Stable.
License in practice
Licensed under GPL-3.0-or-later (copyleft). Any derivative work or bundled distribution must be released under compatible terms; proprietary or closed-source projects cannot use this without separate licensing.
Quickstart
pip install igwn-segments
from igwn_segments import segment, segmentlist
s = segment(0, 10)
sl = segmentlist([s])
Requires Python 3.9 or later; compiled wheels available for Python 3.10–3.13 on macOS, Linux (x86_64, aarch64), and musl systems.
Verify before relying
- Whether the package is actively maintained post-fork or in maintenance-only mode (repo metadata unavailable).
- Performance characteristics and scalability limits for large segmentlists.
- Specific use cases beyond gravitational-wave data analysis where this is commonly applied.
Package facts
| License | GPL-3.0-or-later (copyleft) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | aging — 207 days since the last release |
| First released | |
| Downloads | 110,456/month — #12,460 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: igwn_segments-2.1.1-cp310-cp310-macosx_13_0_x86_64.whl; igwn_segments-2.1.1-cp310-cp310-macosx_15_0_arm64.whl; igwn_segments-2.1.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl; igwn_segments-2.1.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; igwn_segments-2.1.1-cp310-cp310-musllinux_1_2_aarch64.whl; igwn_segments-2.1.1-cp310-cp310-musllinux_1_2_x86_64.whl; igwn_segments-2.1.1-cp311-cp311-macosx_13_0_x86_64.whl; igwn_segments-2.1.1-cp311-cp311-macosx_15_0_arm64.whl; igwn_segments-2.1.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl; igwn_segments-2.1.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; igwn_segments-2.1.1-cp311-cp311-musllinux_1_2_aarch64.whl; igwn_segments-2.1.1-cp311-cp311-musllinux_1_2_x86_64.whl; igwn_segments-2.1.1-cp312-cp312-macosx_12_0_arm64.whl; igwn_segments-2.1.1-cp312-cp312-macosx_13_0_x86_64.whl; igwn_segments-2.1.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl; igwn_segments-2.1.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; igwn_segments-2.1.1-cp312-cp312-musllinux_1_2_aarch64.whl; igwn_segments-2.1.1-cp312-cp312-musllinux_1_2_x86_64.whl; igwn_segments-2.1.1-cp313-cp313-macosx_12_0_arm64.whl; igwn_segments-2.1.1-cp313-cp313-macosx_13_0_x86_64.whl
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
igwn-ligolwReads, writes, and manipulates LIGO…
copyleft · top 15,000 on PyPI
lalsuiteLALSuite provides data analysis routines for…
copyleft · top 15,000 on PyPI
intervalsProvides Python classes for representing and…
permissive · top 15,000 on PyPI
portionportion provides data structures and operations…
copyleft · top 5,000 on PyPI
dttlibdttlib provides frequency-domain analysis tools…
unclear · top 15,000 on PyPI
lscsoft-glueLSCSoft-GLUE provides utilities and grid access…
copyleft · top 15,000 on PyPI
piecewise-regressionFits piecewise linear regression models to data…
permissive · top 15,000 on PyPI
intervaltreeA self-balancing interval tree data structure…
permissive · top 5,000 on PyPI
igwn-auth-utilsDiscovers and deserializes X.509 credentials…
permissive · top 15,000 on PyPI
nclsNCLS provides a fast interval overlap query…
permissive · top 15,000 on PyPI