Skip to content

Use should_simulate in JAX auto-simulation blocks#14

Merged
Jammy2211 merged 1 commit intomainfrom
feature/small-datasets-resimulate
Apr 7, 2026
Merged

Use should_simulate in JAX auto-simulation blocks#14
Jammy2211 merged 1 commit intomainfrom
feature/small-datasets-resimulate

Conversation

@Jammy2211
Copy link
Copy Markdown
Collaborator

Summary

Replace not path.exists(dataset_path) with al.util.dataset.should_simulate(dataset_path) in all 13 JAX likelihood function scripts. This ensures datasets are automatically deleted and re-created when PYAUTO_WORKSPACE_SMALL_DATASETS is toggled, preventing shape mismatches between FITS files and masks.

Scripts Changed

  • scripts/jax_likelihood_functions/imaging/lp.py — use should_simulate
  • scripts/jax_likelihood_functions/imaging/mge.py — same
  • scripts/jax_likelihood_functions/imaging/mge_group.py — same
  • scripts/jax_likelihood_functions/imaging/delaunay.py — same
  • scripts/jax_likelihood_functions/imaging/delaunay_mge.py — same
  • scripts/jax_likelihood_functions/imaging/rectangular.py — same
  • scripts/jax_likelihood_functions/imaging/rectangular_mge.py — same
  • scripts/jax_likelihood_functions/imaging/rectangular_dspl.py — same
  • scripts/jax_likelihood_functions/interferometer/mge.py — same
  • scripts/jax_likelihood_functions/interferometer/rectangular.py — same
  • scripts/jax_likelihood_functions/interferometer/mge_group.py — same
  • scripts/jax_likelihood_functions/point_source/point.py — same (pathlib → str conversion)
  • scripts/jax_likelihood_functions/multi/mge.py — same

Upstream PRs

Test Plan

  • Smoke tests pass for autolens_test workspace

🤖 Generated with Claude Code

Replace path.exists checks with should_simulate so that datasets are
automatically deleted and re-created when PYAUTO_WORKSPACE_SMALL_DATASETS
is toggled, preventing shape mismatches between FITS files and masks.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Jammy2211 Jammy2211 merged commit e0120d8 into main Apr 7, 2026
@Jammy2211 Jammy2211 deleted the feature/small-datasets-resimulate branch April 7, 2026 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant