Skip to content

feat: add point-source light profiles - #562

Merged
Jammy2211 merged 2 commits into
mainfrom
feature/point-source-light
Aug 9, 2026
Merged

feat: add point-source light profiles#562
Jammy2211 merged 2 commits into
mainfrom
feature/point-source-light

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

  • Add flux-conserving discrete point-source light profiles for direct image-plane emission.
  • Support standard and linear-intensity variants through image evaluation, PSF convolution, galaxy aggregation, and inversion mapping matrices.
  • Preserve parent-grid geometry during oversampled PSF evaluation so sub-pixel source placement remains well defined.

Closes #561

API Changes

Adds ag.lp.PointSource and ag.lp_linear.PointSource for unresolved image-plane emission.
Point-source intensity is total detector flux, conserved across light-profile over-sampling and oversampled PSF convolution.
Adds unbinned image-evaluation hooks used by composite light objects during oversampled convolution.
This does not replace ag.ps.PointFlux plus PyAutoLens's PointSolver for multiple lensed point images.
See full details below.

Test Plan

  • Verify point placement, bounds, irregular-grid behavior, and flux conservation at over-sampling factors 1, 2, and 4.
  • Verify sub-pixel shifts and flux conservation through oversampled PSF convolution.
  • Verify Galaxy/Galaxies aggregation and linear inversion mapping-matrix behavior.
  • Run python -m pytest test_autogalaxy/ -x -q (1022 passed, 5 skipped).
  • Run Black and whitespace checks on the changed files.
Full API Changes (for automation & release notes)

Removed

  • None.

Added

  • ag.lp.PointSource(centre=(0.0, 0.0), intensity=0.1) — discrete direct image-plane emission with total-flux normalization.
  • ag.lp_linear.PointSource(centre=(0.0, 0.0)) — point-source intensity solved by linear inversion.
  • LightProfile.image_2d_unbinned_from(...) — evaluates over-sampled coordinates while retaining parent-grid metadata.
  • Galaxy.image_2d_unbinned_from(...), Galaxies.image_2d_unbinned_from(...), and corresponding list/dict variants — propagate unbinned evaluation through composite light objects.

Changed Behaviour

  • Oversampled PSF convolution now retains the parent Grid2D during profile evaluation before converting values to the convolver's fine-resolution format.
  • intensity on PointSource denotes total discrete detector flux; the selected sub-pixel is scaled so mean-binning preserves that flux.

Migration

  • None required for existing profiles.
  • Use ag.ps.PointFlux with PyAutoLens's PointSolver when modelling multiple images produced by lensing.

Generated by the PyAutoLabs agent workflow.

@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Aug 9, 2026 — with ChatGPT Codex Connector

Copy link
Copy Markdown
Collaborator Author

Workspace companions are ready as drafts:

Both use the shared feature/point-source-light branch and carry pending-release so the library PR remains the merge gate.

Copy link
Copy Markdown
Collaborator Author

Companion workspace CI is now fully green:

Both remain draft and pending-release behind this library PR.

@Jammy2211
Jammy2211 marked this pull request as ready for review August 9, 2026 14:47
@Jammy2211 Jammy2211 removed the pending-release PR queued for the next release build label Aug 9, 2026
@Jammy2211
Jammy2211 merged commit 103de4c into main Aug 9, 2026
3 checks passed
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.

feat: add point-source light profiles

1 participant