Skip to content

test: pin MassField retention in chained lens models - #745

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/mass-field-chaining-helper
Sep 19, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/mass-field-chaining-helper

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Add a lens-side integration witness and cookbook example for field-aware mass chaining. The test composes a PowerLaw stage from an Isothermal stage, keeps the flat field prior path, builds a tracer with one field, and checks the fixed-field route. PyAutoLens already re-exports PyAutoGalaxy's chaining module, so no Lens source adapter is needed.

Refs PyAutoLabs/PyAutoGalaxy#624. Depends on PyAutoLabs/PyAutoGalaxy#625.

API Changes

The new mass_and_fields_from helper from PyAutoGalaxy becomes available as al.util.chaining.mass_and_fields_from through the existing module re-export. Existing PyAutoLens behavior is unchanged.
See full details below.

Test Plan

  • pytest -q test_autolens/ -x: PASS.
  • Focused chaining and tracer-field tests: 50 passed.
Full API Changes (for automation & release notes)

Removed

  • None.

Added

  • autolens.util.chaining.mass_and_fields_from(mass, mass_result, *, fields_result, unfix_mass_centre=False) — re-export of the PyAutoGalaxy helper.

Renamed

  • None.

Changed Signature

  • None.

Changed Behaviour

  • None for existing functions.

Migration

  • Compose a chained model with the returned field in bare fields=field; result.model.fields keeps posterior priors and result.instance.fields fixes values.

Generated by the PyAutoLabs agent workflow.

@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Sep 19, 2026
@Jammy2211
Jammy2211 merged commit 50c0046 into main Sep 19, 2026
4 checks passed
@Jammy2211
Jammy2211 deleted the feature/mass-field-chaining-helper branch September 19, 2026 17:07
@Jammy2211 Jammy2211 removed the pending-release PR queued for the next release build label Sep 26, 2026
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