Remove ND support from AdaptiveRingBackgroundEstimator
@@ -212,13 +212,16 @@ class AdaptiveRingBackgroundEstimator(object):
required = ['counts', 'exposure_on', 'exclusion']
counts_map, exposure_on_map, exclusion_map = [images[_] for _ in required]
+ if counts_map.geom.is_image():
+ raise NotImplementedError('Adaptive ring background estimation only'
+ ' supported for 2D images.')
+
result = {}
result['exposure_off'] = exposure_on_map.copy(unit='')
result['off'] = exposure_on_map.copy(unit='')
result['alpha'] = exposure_on_map.copy(unit='')
result['background'] = exposure_on_map.copy(unit='')
- for idx in np.ndindex(counts_map.geom.shape):
counts = counts_map.get_image_by_idx(idx)
exposure_on = exposure_on_map.get_image_by_idx(idx)
exclusion = exclusion_map.get_image_by_idx(idx)
