Fill-the-Frames / tests /test_standardizer.py
Siddhant Sharma
Added multi satellite based fetching for training
4e9fa0a
Raw
History Blame Contribute Delete
448 Bytes
import torch
from src.data.standardizer import UniversalStandardizer
def test_normalize_bt():
bt = torch.tensor([180.0, 255.0, 330.0])
out = UniversalStandardizer.normalize_bt(bt)
assert out[0] == 0.0
assert out[2] == 1.0
assert 0.0 <= out[1] <= 1.0
def test_normalize_bt_clipping():
bt = torch.tensor([100.0, 400.0])
out = UniversalStandardizer.normalize_bt(bt)
assert out[0] == 0.0
assert out[1] == 1.0