Merged
Conversation
added 12 commits
February 11, 2026 11:48
…l deflection angles
Contributor
There was a problem hiding this comment.
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 routedeflections_yx_2d_from(...)through it. - Update HK24 utility functions to accept an
xpbackend (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.
added 8 commits
February 13, 2026 10:28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JAXIFIED eNFW deflection angle calculations