Skip to content

Remove PyIMRPhenomD dependency and the IMRPhenomD waveform model - #51

Merged
mcdigman merged 2 commits into
devfrom
remove-pyimrphenomd
Sep 23, 2026
Merged

mcdigman merged 2 commits into
devfrom
remove-pyimrphenomd

Conversation

@mcdigman

@mcdigman mcdigman commented Sep 16, 2026 •

Copy link
Copy Markdown
Owner

The TaylorF2 models are kept and unaffected — they remain the supported waveform family.

Removed

  • LisaWaveformTools/imrphenomd_waveform.py — the PyIMRPhenomD-backed waveform model (679 lines)
  • tests/test_imrphenomd.py — cross-checked that module against PyIMRPhenomD internals (1171 lines)
  • The model_select == 'imrphenomd' branch in taylorf2_intrinsic_freq, plus the now-unused numpy import in taylorf2_freq_source.py
  • The imrphenomd optional-dependency extra in pyproject.toml and its README section
  • The PyIMRPhenomD entries and explanatory notes in [tool.pyrefly] and .pre-commit-config.yaml
  • reportMissingImports = "none" in [tool.pyright], plus the matching comment in .github/workflows/typecheck.yml

PyIMRPhenomD is not published on PyPI and can only be installed from
source, which made the `imrphenomd` extra uninstallable and forced
PyIMRPhenomD-specific carve-outs into every type-checking configuration.
Drop the dependency and the code that needed it. The TaylorF2 models are
unaffected and remain the supported waveform family.

Removed:
- LisaWaveformTools/imrphenomd_waveform.py (the PyIMRPhenomD-backed model)
- tests/test_imrphenomd.py (cross-checked that module against PyIMRPhenomD)
- the `model_select == 'imrphenomd'` branch in taylorf2_intrinsic_freq
- the `imrphenomd` optional-dependency extra and its README section
- the PyIMRPhenomD entries/notes in [tool.pyrefly] and .pre-commit-config.yaml
- `reportMissingImports = "none"` in [tool.pyright], plus the matching note in
  .github/workflows/typecheck.yml. That setting existed only to tolerate
  PyIMRPhenomD; with it gone, every import the project makes resolves in the
  pyright job's environment, so the check is restored to its default strength
  rather than left globally disabled.

Other changes:
- tests/test_binary_load.py no longer imports chiPN from PyIMRPhenomD; it
  uses a local chi_postnewtonian_reference helper computing the same PN
  reduced spin parameter (Eq 5.9 of arXiv:1107.1267v2), so the test keeps
  an oracle independent of BinaryIntrinsicParamsManager. Its docstring
  now describes what it actually tests.
- demo_likelihood.py switches from 'imrphenomd' to 'taylorf2_aligned'.
- Dropped a stale "use imrphenomd instead" TODO in taylorf2_helpers.py.

The IMRPhenom literature citations in taylorf2_helpers.py are kept: they
document the phenomenological amplitude coefficients used by the TaylorF2
aligned-spin model and are not a dependency on PyIMRPhenomD.
@mcdigman
mcdigman changed the base branch from main to dev September 17, 2026 02:43
numba 0.66.0 (released 2026-07-01) stopped re-exporting the `errors`
submodule from the top-level `numba` package, so pyright 1.1.410 flags
`numba.errors.TypingError` as reportPrivateImportUsage and the Type Check
CI job fails. Import TypingError directly from its defining module
(numba.core.errors), which is stable across numba versions and creates no
new version floor.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@mcdigman
mcdigman merged commit 3a43c05 into dev Sep 23, 2026
4 of 5 checks passed
@mcdigman
mcdigman deleted the remove-pyimrphenomd branch September 23, 2026 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant