File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
autoarray/operators/over_sampling Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -232,6 +232,9 @@ def over_sample_size_via_radial_bins_from(
232232 """
233233 Returns an adaptive sub-grid size based on the radial distance of every pixel from the centre of the mask.
234234
235+ When ``PYAUTO_WORKSPACE_SMALL_DATASETS=1`` returns a uniform size-2 array
236+ immediately, skipping the expensive radial-bin computation and numba JIT.
237+
235238 The adaptive sub-grid size is computed as follows:
236239
237240 1) Compute the radial distance of every pixel in the mask from the centre of the mask (or input centres).
@@ -264,6 +267,11 @@ def over_sample_size_via_radial_bins_from(
264267 the centre of the mask.
265268 """
266269
270+ import os
271+
272+ if os .environ .get ("PYAUTO_WORKSPACE_SMALL_DATASETS" ) == "1" :
273+ return Array2D (values = np .full (grid .shape_slim , 2.0 ), mask = grid .mask )
274+
267275 if centre_list is None :
268276 centre_list = [grid .mask .mask_centre ]
269277
You can’t perform that action at this time.
0 commit comments