Skip to content

Commit cb71445

Browse files
committed
refactor: remove unused imports and clean up observation scaling logic in Sampler
1 parent 8ae0338 commit cb71445

1 file changed

Lines changed: 1 addition & 14 deletions

File tree

  • sup3r/preprocessing/samplers

‎sup3r/preprocessing/samplers/base.py‎

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,7 @@
1616
uniform_time_sampler,
1717
)
1818
from sup3r.preprocessing.utilities import compute_if_dask, lowered
19-
from sup3r.utilities.utilities import (
20-
OUTPUT_ATTRS,
21-
RANDOM_GENERATOR,
22-
get_feature_basename,
23-
)
19+
from sup3r.utilities.utilities import RANDOM_GENERATOR
2420

2521
logger = logging.getLogger(__name__)
2622

@@ -440,15 +436,6 @@ def _get_proxy_obs(self, hi_res):
440436
if scale > 0:
441437
srange = stds[..., i] * scale
442438
obs[..., i] += np.random.normal(scale=srange)
443-
base = get_feature_basename(feat.replace('_obs', ''))
444-
attrs = OUTPUT_ATTRS.get(base, {})
445-
lo = attrs.get('min', -np.inf)
446-
hi = attrs.get('max', np.inf)
447-
obs[..., i] = np.where(
448-
np.isnan(obs[..., i]),
449-
obs[..., i],
450-
np.clip(obs[..., i], lo, hi),
451-
)
452439
return obs
453440

454441
def _append_obs_features(self, samples):

0 commit comments

Comments
 (0)