Skip to content

Add should_simulate utility for auto-simulation with small datasets#261

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

Add should_simulate utility for auto-simulation with small datasets#261
Jammy2211 merged 1 commit intomainfrom
feature/small-datasets-resimulate

Conversation

@Jammy2211
Copy link
Copy Markdown
Collaborator

Summary

Adds autoarray.util.dataset_util.should_simulate(dataset_path) — a drop-in replacement for not path.exists(dataset_path) in workspace auto-simulation blocks. When PYAUTO_WORKSPACE_SMALL_DATASETS=1 is active, it deletes existing datasets so they are re-simulated at the reduced 15x15 resolution, preventing shape mismatches.

API Changes

Added

  • autoarray.util.dataset_util.should_simulate(dataset_path) — returns True if dataset needs simulation; auto-deletes stale datasets when small-datasets env var is toggled
  • Exposed as aa.util.dataset.should_simulate()

Test Plan

  • PyAutoArray unit tests pass (722 passed)
  • Manual verification of should_simulate behavior

🤖 Generated with Claude Code

When PYAUTO_WORKSPACE_SMALL_DATASETS=1 is active, existing datasets are
deleted so simulators re-create them at the reduced 15x15 resolution.
This avoids shape mismatches between full-resolution FITS files on disk
and the mask/grid cap applied by the env var.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Jammy2211 Jammy2211 merged commit 43213ea into main Apr 7, 2026
2 checks passed
@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