skillfed

igwn-segments

Representations of semi-open intervals

igwn-segments v2.1.1 110.5K downloads/30d#12,460 on PyPI
Copyleft license GPL-3.0-or-later AGING released

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-segments

uv

uv add igwn-segments

poetry

poetry add igwn-segments

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: End Users/DesktopIntended Audience :: Science/ResearchLicense :: OSI Approved :: GNU General Public License v3 (GPLv3)Natural Language :: EnglishOperating System :: MacOSOperating System :: POSIXOperating System :: UnixProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Topic :: Scientific/EngineeringTopic :: Scientific/Engineering :: AstronomyTopic :: Scientific/Engineering :: Physics

Tags

semi-open interval representationsegment manipulation librarytime interval handlingsegmentlist data structureinterval arithmetic pythongravitational wave segment toolstime window management
interval-arithmetictime-seriesgravitational-waves

More Scientific/Engineering packages