feat(interferometer): from_fits accepts raise_error_dft_visibilities_limit#311
Merged
Conversation
…limit Thread the existing constructor kwarg through `Interferometer.from_fits` so callers loading >10,000-visibility datasets with TransformerDFT (e.g. when profiling the JAX-traceable DFT path at ALMA-scale before nufftax is wired in) can opt out of the safety guard without reconstructing the dataset by hand. Default behaviour unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
3 tasks
Collaborator
Author
|
Workspace PR: PyAutoLabs/autolens_workspace_developer#63 |
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
Thread
raise_error_dft_visibilities_limitthroughInterferometer.from_fitsto its constructor. Previously the kwarg was only reachable via the constructor — callers loading FITS data had no way to opt out of the >10,000-visibility DFT safety check.This unblocks the JAX-profiling workflow against Hannah Stacey's ALMA cube (16,984 visibilities × 34 channels) where the JIT path intentionally uses
TransformerDFTbecause pynufft is not JAX-traceable. With this kwarg, the profiler can load the dataset via the standardfrom_fitsAPI instead of replicating its internals.API Changes
Added one optional keyword argument (
raise_error_dft_visibilities_limit: bool = True) toautoarray.Interferometer.from_fits. The default matches the existing constructor behaviour — no migration needed for existing callers. See full details below.Test Plan
pytest test_autoarray/dataset/interferometer/test_dataset.py::test__from_fits__raise_error_dft_visibilities_limit__threads_kwarg -xvspasses.test_autoarray/dataset/interferometer/test_dataset.pysuite still passes.Full API Changes (for automation & release notes)
Added
autoarray.Interferometer.from_fits(..., raise_error_dft_visibilities_limit: bool = True)— new optional kwarg that forwards to theInterferometerconstructor. Set toFalseto bypass the 10,000-visibility safety guard when loading a DFT-based interferometer dataset from FITS (use case: profiling the JAX-traceable DFT path at ALMA-scale before a JIT-friendly NUFFT is available).Migration
🤖 Generated with Claude Code