|
|
|
@ -213,6 +213,29 @@ def test_normalize_values_custom_param(normalization_data_frame):
@@ -213,6 +213,29 @@ def test_normalize_values_custom_param(normalization_data_frame):
|
|
|
|
|
assert list(sorted_results[normalized_col]) == expected_values |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_normalize_values_preset_param(normalization_data_frame): |
|
|
|
|
from sensospot_data.columns import ( |
|
|
|
|
RAW_DATA_NORMALIZATION_MAP, |
|
|
|
|
SETTINGS_NORMALIZED_EXPOSURE_TIME, |
|
|
|
|
) |
|
|
|
|
from sensospot_data.dynamic_range import ( |
|
|
|
|
PROBE_MULTI_INDEX, |
|
|
|
|
blend, |
|
|
|
|
normalize_values, |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
reduced = blend(normalization_data_frame, "Saturation", 1) |
|
|
|
|
reduced[SETTINGS_NORMALIZED_EXPOSURE_TIME] = 100 |
|
|
|
|
|
|
|
|
|
result = normalize_values(reduced) |
|
|
|
|
|
|
|
|
|
sorted_results = result.sort_values(by=PROBE_MULTI_INDEX) |
|
|
|
|
expected_values = [2, 8, 30, 2, 20, 20, 20, 20, 200, 200, 200, 200] |
|
|
|
|
|
|
|
|
|
for normalized_col in RAW_DATA_NORMALIZATION_MAP.values(): |
|
|
|
|
assert list(sorted_results[normalized_col]) == expected_values |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_create_xdr(normalization_data_frame): |
|
|
|
|
from sensospot_data.columns import RAW_DATA_NORMALIZATION_MAP |
|
|
|
|
from sensospot_data.dynamic_range import PROBE_MULTI_INDEX, create_xdr |
|
|
|
|