feat: SimulatorInterferometer.via_tracer_from auto-default xp from parent use_jax#540
Merged
Merged
Conversation
…arent Changes via_tracer_from / via_galaxies_from on autolens's SimulatorInterferometer override to default xp=None and fall back to self._xp inherited from aa.SimulatorInterferometer. When the simulator is constructed with use_jax=True, both methods route xp=jnp through tracer.image_2d_from / galaxies.image_2d_from and via_image_from without the user passing xp explicitly. Depends on Jammy2211/PyAutoArray PR adding use_jax constructor flag + _xp property to the parent aa.SimulatorInterferometer. Part of Phase 2 PR 3 of z_features/jax_user_intro.md. Issue: PyAutoArray#334 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
Companion PR to the PyAutoArray PR adding
use_jax=Truetoaa.SimulatorInterferometer. The autolensvia_tracer_fromandvia_galaxies_fromoverrides gainxp=Noneparameter and default toself._xpfrom the parent.After both PRs merge:
API Changes
al.SimulatorInterferometer.via_tracer_from(tracer, grid, xp=None)andvia_galaxies_from(galaxies, grid, xp=None)— both gainxpparameter;xp=Nonefalls back toself._xp.See full details below.
Test Plan
Full API Changes
Changed signature
al.SimulatorInterferometer.via_tracer_from(tracer, grid, xp=None).al.SimulatorInterferometer.via_galaxies_from(galaxies, grid, xp=None).Migration
Depends on
use_jaxtoaa.SimulatorInterferometer. Merge PyAutoArray PR first.🤖 Generated with Claude Code