Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]
Added
- Catalog Plugin Registry: Introduced a dynamic
@register_catalogdecorator and catalog registry framework undernrcats/registry.pyto allow runtime extensions and registration of custom catalog backends. - Waveform Sub-package Refactoring: Fully split the massive 60 KB monolithic
waveform.pyinto a highly maintainablenrcats/waveform/sub-package containing modular components:modes.py: Defines theWaveformModescore interface.loaders.py: Dedicated HDF5 and tarball loaders.units.py: Waveform interpolation, physical unit scaling, and extraction tools.matching.py: Sphere-averaged mismatch computation and Wigner rotation utilities.- Fully backward-compatible top-level
waveform.pyshim re-exports all members.
- YAML Schema Mapping: Extracted key mapping tables from
metadata.pyinto separate catalog schemas (rit_keys.yaml,sxs_keys.yaml,maya_keys.yaml) located innrcats/schemas/to ease catalog extension without touching core code. - Conda & PyProject Build Infrastructure: Modernized package building using
pyproject.tomlwithsetuptools >= 64andsetuptools_scmfor automatic git-tag-based versioning. - Interactive Documentation: Replaced tutorial stubs with two rich, executable step-by-step notebooks/tutorials covering waveform loading, mode visualization, and cross-catalog mismatch validation. Added plain-text HTML fallbacks for LaTeX math rendering and a “Building the docs locally” section in the README.
Changed
- Breaking Change:
CatalogBasedecoupled from third-party packagesxs. It no longer inherits from the deprecatedsxs.Catalogobject, removing unused SXS-specific internal metadata records (e.g._dict["records"],_dict["modified"]) from RIT and MAYA catalogs. - Breaking Change:
SXSCatalogbackend migrated to use the newsxs.Simulationsinfrastructure natively (sxs >= 2024.0.0required). - Breaking Change:
catalog.simulations_dataframeforSXSCatalognow returns a richsxs.SimulationsDataFramesupporting advanced filtering and properties (e.g..BBH,.noneccentric). - Breaking Change: Removed legacy flat metadata fields
catalog.files,catalog.select(), andcatalog.select_files(). Downstream users can load per-simulation file catalogs dynamically viasxs.load(sim_id).files. - Waveform Mode Access: Accessing missing modes when loading a tarball (
load_from_targz) now emits a descriptiveUserWarningand keeps track of truly present modes in the_present_modesset, avoiding silent zero-padding errors.
Deprecated
delta_tMagic Convention: Deprecated the positionaldelta_tparameter with implicit physical-vs-dimensionless thresholding. Downstream callers are prompted via aDeprecationWarningto transition to the explicit parametersdelta_t_secondsanddelta_t_Msun.
Fixed
- Scipy Compatibility: Fixed compatibility failures with Scipy 1.11+ by replacing the deprecated
scipy.stats.modesignature with a robust numpy-based unique count fallback during grid generation. - Stale LRU Cache: Fixed a silent bug in
RITCatalog.load()where@lru_cachereturned stale cached results when togglingdownload=True. Replaced with a stateful_rit_catalog_singletonand a dedicatedreload()method. - Sentinel-Key Heuristic: Eliminated fragile sentinel key checks (
"relaxed_mass1","GTID") in metadata parsing by introducing an explicitcatalog_typemetadata injection. - Network Resilience: Capped download retry counts to
5(down from100hangs) and implemented an exponential backoff retry strategy with properConnectionErrorreporting. - RIT Catalog Metadata Keys: Corrected RIT catalog parsing to match dash-based metadata keys (e.g.
relaxed-mass-ratio-1-over-2,relaxed-chi1x,freq-start-22) in modern RIT catalog schema.
Migration Guide for Downstream Users
Type Assertions
Downstream code checking isinstance(catalog, sxs.Catalog) will now evaluate to False for all catalog objects. Use isinstance(catalog, nrcats.CatalogBase) instead.
SXS Tooling Interoperability
If you need to pass a catalog directly to downstream sxs APIs (e.g. closest_simulation), call .to_sxs() on any nrcats catalog object to obtain a valid sxs.Simulations native instance:
# Returns an sxs.Simulations object
sxs_native = catalog.to_sxs()
Per-Simulation File Resolution
Instead of checking the global flat map catalog.files, load files on-demand for a given simulation ID:
# Modern way to resolve files:
sim_files = sxs.load(sim_id).files
Sampling Time Steps
Replace ambiguous delta_t parameters with explicit time steps:
# Old (Deprecated)
modes = wfm.get_mode(2, 2, delta_t=1/4096)
# New (Explicit Seconds)
modes = wfm.get_mode(2, 2, delta_t_seconds=1/4096)
# New (Explicit Dimensionless M)
modes = wfm.get_mode(2, 2, delta_t_Msun=0.5)