Skip to content

feat(interferometer): from_fits accepts raise_error_dft_visibilities_limit#311

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/datacube-hannah-preset
May 15, 2026
Merged

feat(interferometer): from_fits accepts raise_error_dft_visibilities_limit#311
Jammy2211 merged 1 commit into
mainfrom
feature/datacube-hannah-preset

Conversation

@Jammy2211
Copy link
Copy Markdown
Collaborator

Summary

Thread raise_error_dft_visibilities_limit through Interferometer.from_fits to 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 TransformerDFT because pynufft is not JAX-traceable. With this kwarg, the profiler can load the dataset via the standard from_fits API instead of replicating its internals.

API Changes

Added one optional keyword argument (raise_error_dft_visibilities_limit: bool = True) to autoarray.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 -xvs passes.
  • Existing test_autoarray/dataset/interferometer/test_dataset.py suite still passes.
  • Verify CI green.
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 the Interferometer constructor. Set to False to 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

  • None — default behaviour unchanged.

🤖 Generated with Claude Code

…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) <noreply@anthropic.com>
@Jammy2211
Copy link
Copy Markdown
Collaborator Author

Workspace PR: PyAutoLabs/autolens_workspace_developer#63

@Jammy2211 Jammy2211 merged commit 3ddf368 into main May 15, 2026
6 checks passed
@Jammy2211 Jammy2211 deleted the feature/datacube-hannah-preset branch May 15, 2026 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending-release PR queued for the next release build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant