Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions autoarray/operators/over_sampling/over_sample_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,9 @@ def over_sample_size_via_radial_bins_from(
"""
Returns an adaptive sub-grid size based on the radial distance of every pixel from the centre of the mask.

When ``PYAUTO_WORKSPACE_SMALL_DATASETS=1`` returns a uniform size-2 array
immediately, skipping the expensive radial-bin computation and numba JIT.

The adaptive sub-grid size is computed as follows:

1) Compute the radial distance of every pixel in the mask from the centre of the mask (or input centres).
Expand Down Expand Up @@ -264,6 +267,11 @@ def over_sample_size_via_radial_bins_from(
the centre of the mask.
"""

import os

if os.environ.get("PYAUTO_WORKSPACE_SMALL_DATASETS") == "1":
return Array2D(values=np.full(grid.shape_slim, 2.0), mask=grid.mask)

if centre_list is None:
centre_list = [grid.mask.mask_centre]

Expand Down
Loading