diff --git a/src/AMBER/background.py b/src/AMBER/background.py index a1d0677..355c5a6 100644 --- a/src/AMBER/background.py +++ b/src/AMBER/background.py @@ -617,7 +617,7 @@ class background(): new_loss = 1000000 k = 0 - while (np.abs(old_loss - new_loss) > 1e-3) and (k < n_epochs): + while (old_loss - new_loss > 1e-3) and (k < n_epochs): # Compute A = Y - B by filling the nans with 0s A = np.where(np.isnan(Y_r - b_tmp) == True, 0.0, Y_r - b_tmp)