Repository navigation
feat: magnification latent from raw fluxes, no magzero (arc phase 7a) - #813
Merged
Merged
Conversation
magnification = total_lensed_source_flux / total_source_flux (was the µJy latents, NaN without magzero; identical for positive fluxes since the µJy factor cancels). Stays default false (opt-in); latent.yaml documents it and why per-image magnifications are not latents. Closes #812 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 task done
Collaborator
Author
|
Workspace PR: PyAutoLabs/autolens_workspace#609 |
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.
Summary
Arc phase 7a (epic
cluster-strong-lensing). Themagnificationlatent was the ratio of the two µJy latents, so it was NaN unless the Analysis had amagzero— even though the ratio is dimensionless. It is nowtotal_lensed_source_flux / total_source_flux(the raw-flux latents), identical for positive fluxes because the µJy conversion is one common factor. Works for light-profile and pixelized sources as before.Human ruling 2026-10-30: keep it opt-in (default
false) and explain latents only where results are explained (config/latent.yaml+ autolens_workspaceguides/results/latent_variables.py), not in every workspace script. Per-image point / area magnifications are not latents (the number of images differs between lenses); latent.yaml says so.API Changes
magnificationlatent no longer needsmagzero(itsmagzeroargument is now optional and unused); default unchanged (off).See full details below.
Test Plan
test_magnification_needs_no_magzero: finite withmagzero=None, equals the raw-flux ratio, same value withmagzero=25; fails without the changetest_autolens/analysis/test_latent.py: 38 passed; full PyAutoLens suite 1016 passed, 1 xfailedFull API Changes (for automation & release notes)
Changed Behaviour
autolens.analysis.latent.magnification(fit, magzero=None, xp=np)— computed fromtotal_lensed_source_flux / total_source_flux; wastotal_lensed_source_flux_mujy / total_source_flux_mujy(NaN withoutmagzero)Heart at ship: STALE (release validation stale: source moved since rehearsal).
Generated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code