fix: disable positions-likelihood exception for pix/delaunay profiling#39
Merged
Merged
Conversation
PyAutoLens's AnalysisImaging / AnalysisInterferometer raises an AnalysisException by default when a pixelization-based source is fitted without a ``positions_likelihood_list``. The check guards against the demagnified-source systematic that pixelization fits are vulnerable to. For profiling we don't care about solution quality — we're measuring sampler + likelihood cost — and we don't have a prior phase result to derive ``positions_likelihood_from`` from. Disable the check via ``raise_inversion_positions_likelihood_exception=False`` for the pixelization and delaunay model_types only; MGE / point-source cells keep the default (no inversion-positions concern). Discovered by A100 delaunay retry (322593 + 322594) crashing at AnalysisImaging.modify_before_fit after the areas_factor fix landed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Surfaced by A100 delaunay retry (322593 Nautilus + 322594 NSS) after PR #38: both crashed at `AnalysisImaging.modify_before_fit`:
```
autogalaxy.exc.AnalysisException:
You have begun a model-fit which reconstructs the source using a pixelization.
However, you have not input a `positions_likelihood_list` object.
```
PyAutoLens's analysis classes raise this by default when a pixelization is fitted without positions, to guard against the demagnified-source systematic. SLaM pipelines build a `positions_likelihood` from a prior `source_lp` result; we don't have that here.
For profiling we don't care about solution quality — we're measuring sampler + likelihood cost end-to-end. Disable the check via `raise_inversion_positions_likelihood_exception=False` for the pix/delaunay model types only. MGE / point-source cells keep the default.
Test plan
🤖 Generated with Claude Code