Skip to content

Feature/jax e nfw#279

Merged
NiekWielders merged 20 commits intomainfrom
feature/jax_eNFW
Feb 13, 2026
Merged

Feature/jax e nfw#279
NiekWielders merged 20 commits intomainfrom
feature/jax_eNFW

Conversation

@NiekWielders
Copy link
Copy Markdown
Collaborator

JAXIFIED eNFW deflection angle calculations

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new analytic (HK24) implementation for elliptical NFW (eNFW) deflection angles intended to be compatible with JAX-style array backends, and updates tests to exercise the new analytic path.

Changes:

  • Add NFW.deflections_2d_via_analytic_from(...) and route deflections_yx_2d_from(...) through it.
  • Update HK24 utility functions to accept an xp backend (NumPy/JAX).
  • Add / update tests covering analytic deflection outputs and the new default deflection path.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
autogalaxy/profiles/mass/dark/nfw.py Adds analytic HK24 eNFW deflections and changes deflections_yx_2d_from to use them.
autogalaxy/profiles/mass/dark/nfw_hk24_util.py Generalizes HK24 helper functions to accept an xp backend for JAX compatibility.
test_autogalaxy/profiles/mass/dark/test_nfw.py Adds a direct numeric regression test for analytic deflections and updates a deflections routing test.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@NiekWielders NiekWielders merged commit cb5c7cf into main Feb 13, 2026
8 checks passed
@Jammy2211 Jammy2211 deleted the feature/jax_eNFW branch February 13, 2026 13:43
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.

2 participants