From 0d15f31192cf0c5627de1c7a7581011c648a0bae Mon Sep 17 00:00:00 2001 From: jurjen93 Date: Mon, 12 Feb 2024 18:54:40 +0100 Subject: [PATCH] reformat --- source_selection/pre_processing_for_ml.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source_selection/pre_processing_for_ml.py b/source_selection/pre_processing_for_ml.py index 32af2a43..fc3911f1 100644 --- a/source_selection/pre_processing_for_ml.py +++ b/source_selection/pre_processing_for_ml.py @@ -97,13 +97,13 @@ def transform_data(image_data): """ while image_data.ndim > 2: image_data = image_data[0] - rms = get_rms(image_data) - norm = SymLogNorm(linthresh=rms * 2, linscale=2, vmin=-rms, vmax=rms*50000, base=10) # crop data (half data size) image_data = crop(image_data) # re-normalize data (such that values are between 0 and 1) + rms = get_rms(image_data) + norm = SymLogNorm(linthresh=rms * 2, linscale=2, vmin=-rms, vmax=rms*50000, base=10) image_data = norm(image_data) image_data = np.clip(image_data - image_data.min(), a_min=0, a_max=1)