|
|
|
@ -217,10 +217,7 @@ def test_infer_normalization_map(normalization_data_frame):
@@ -217,10 +217,7 @@ def test_infer_normalization_map(normalization_data_frame):
|
|
|
|
|
|
|
|
|
|
def test_normalize_channel(normalization_data_frame): |
|
|
|
|
from sensospot_data.columns import COLUMN_NORMALIZATION |
|
|
|
|
from sensospot_data.normalisation import ( |
|
|
|
|
reduce_overflow, |
|
|
|
|
normalize_channel, |
|
|
|
|
) |
|
|
|
|
from sensospot_data.normalisation import reduce_overflow, normalize_channel |
|
|
|
|
|
|
|
|
|
reduced = reduce_overflow(normalization_data_frame, "Saturation", 1) |
|
|
|
|
result = normalize_channel(reduced["Cy5"], 50) |
|
|
|
@ -274,7 +271,7 @@ def test_normalize_exposure_time_infered_map(normalization_data_frame):
@@ -274,7 +271,7 @@ def test_normalize_exposure_time_infered_map(normalization_data_frame):
|
|
|
|
|
|
|
|
|
|
def test_normalize_measurement(example_dir): |
|
|
|
|
from sensospot_data.parser import process_folder |
|
|
|
|
from sensospot_data.normalisation import normalize_measurement |
|
|
|
|
from sensospot_data.normalisation import split_channels |
|
|
|
|
|
|
|
|
|
sub_dir = example_dir / EXAMPLE_DIR_WITH_PARAMS |
|
|
|
|
data_frame = process_folder(sub_dir) |
|
|
|
@ -285,7 +282,7 @@ def test_normalize_measurement(example_dir):
@@ -285,7 +282,7 @@ def test_normalize_measurement(example_dir):
|
|
|
|
|
3: ExposureSetting("Cy5", 150), |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
result = normalize_measurement(data_frame, exposure_map) |
|
|
|
|
result = split_channels(data_frame, exposure_map) |
|
|
|
|
cy3_df, cy5_df = result["Cy3"], result["Cy5"] |
|
|
|
|
|
|
|
|
|
assert set(result.keys()) == {"Cy3", "Cy5"} |
|
|
|
|