From 3b94f54ac07bed274d9b452de78996e97a6cd846 Mon Sep 17 00:00:00 2001 From: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Fri, 3 Mar 2023 13:57:28 +0100 Subject: [PATCH] Consistently using the uncertainty as the noise model. --- pes_to_spec/model.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pes_to_spec/model.py b/pes_to_spec/model.py index 8b47e61..7bb760a 100644 --- a/pes_to_spec/model.py +++ b/pes_to_spec/model.py @@ -937,13 +937,13 @@ class Model(TransformerMixin, BaseEstimator): E = np.fft.fftfreq(len(e), de) e_axis = np.linspace(-0.5*(e[-1] - e[0]), 0.5*(e[-1] - e[0]), len(e)) # generate a gaussian - gaussian = np.exp(-0.5*(e_axis)**2/self.high_res_sigma**2) - gaussian /= np.sum(gaussian, axis=0, keepdims=True) - gaussian = np.clip(gaussian, a_min=1e-6, a_max=None) - gaussian_ft = np.fft.fft(gaussian) + #gaussian = np.exp(-0.5*(e_axis)**2/self.high_res_sigma**2) + #gaussian /= np.sum(gaussian, axis=0, keepdims=True) + #gaussian = np.clip(gaussian, a_min=1e-6, a_max=None) + #gaussian_ft = np.fft.fft(gaussian) H = np.mean(Z/D, axis=0) - N = np.absolute(gaussian_ft*V)**2 + N = np.absolute(V)**2 S = np.mean(np.absolute(D)**2, axis=0) H2 = np.absolute(H)**2 nonzero = np.absolute(H) > 0.2 -- GitLab