From 42e7fd5a59697230c4c4bbb5be0d714ad7d3e4e0 Mon Sep 17 00:00:00 2001 From: ssibirtsev <sibi_ballad@gmx.de> Date: Mon, 6 Jan 2025 16:18:40 +0100 Subject: [PATCH] Replace DropDeform_bo.py --- script/DropDeform_bo.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/script/DropDeform_bo.py b/script/DropDeform_bo.py index 1b98fe5..cfeb0a9 100644 --- a/script/DropDeform_bo.py +++ b/script/DropDeform_bo.py @@ -266,8 +266,6 @@ def sample_data(config, M_deform, cor_bo, ish): data_x_new = np.log(data_x_new) # Combine x_data and y_data into a DataFrame for easy manipulation data = pd.DataFrame({'x': data_x_new, 'y': data_y_new}) - # Exclude data points where y == 0 - data = data[data['y'] != 0] # Bin x into equally spaced bins data['x_bin'] = pd.cut(data['x'], bins=config.n_bins, labels=False) # Calculate the minimum number of points in any bin @@ -286,8 +284,7 @@ def sample_data(config, M_deform, cor_bo, ish): # Define x samples for fitting x_sampled = balanced_sample['x'].values # Transfer back into non logarithmic scale - if cor_bo == 0: - x_sampled = np.exp(x_sampled) + x_sampled = np.exp(x_sampled) # Define y samples for fitting y_sampled = balanced_sample['y'].values else: -- GitLab