Repository navigation
fix: los_halos simulator_jax sizes halo arrays with max_n=None - #682
Merged
Merged
Conversation
The fixed max_n=200 was below the fullest plane (300-380 halos with the script's own settings), so halos were silently dropped; with the PyAutoLens fix it would raise. max_n=None keeps every halo. Refs PyAutoLabs/PyAutoLens#869 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
Decision taken (shift worker): the plan said to update |
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
los_halos/simulator_jax.pypacked its halos with a fixedmax_n=200. With the script's own settings, the fullest plane holds 304 halos when the fallback coefficients onmainare used, and 323–377 with the colossus coefficients (seeds 42 and 100–107). So the example was silently dropping halos while the negative sheets still removed their mass. After PyAutoLabs/PyAutoLens#870 the same call raises instead.This switches the example to
max_n=None, which sizes the arrays to the fullest plane. The batched call inherits it and sizes to the fullest plane across the batch. The docstring explains the trade-off: a fixed integermax_navoids recompiling but must be big enough.Merges after PyAutoLabs/PyAutoLens#870 (library first);
max_n=Nonedoes not exist before it.Sibling
autolens_workspace#681 (LOSSampler colossus) edits the same file, in other hunks: the sampler setup (lines ~101–150) and the batch coefficients (~406). This PR touches the
__Convert to Padded Arrays__docstring and lines 254/264 only.Checks
Sampled 1100 LOS halos across 9 planes./Padded to 304 slots per plane (1100 active slots across all planes)./ batch of 8 images(8, 101, 101). Exit 0.🤖 Generated with Claude Code