Skip to content
Snippets Groups Projects
Commit 1d8e0f33 authored by Danilo Ferreira de Lima's avatar Danilo Ferreira de Lima
Browse files

Typo fix

parent 14f470e8
No related branches found
No related tags found
1 merge request!21Calculate SNR and some bug fixes
Pipeline #121945 passed
This commit is part of merge request !21. Comments created here will be created in the context of that merge request.
......@@ -109,7 +109,9 @@ def deconv(y: np.ndarray, yhat: np.ndarray) -> Dict[str, Any]:
sigma_s = np.real(np.sqrt(np.sum(H2*Syy)/n_bins))
snr = sigma_s/sigma_n
return dict(h=np.fft.fftshift(np.fft.ifft(H)),
h = np.real(np.absolute(np.fft.fftshift(np.fft.ifft(H))))
return dict(h=h,
H=H,
H2=H2,
Syy=Syy,
......@@ -152,8 +154,8 @@ def get_resolution(y: np.ndarray, y_hat: np.ndarray, e: np.ndarray,
y_hat_sel = y_hat_sel*f
results = deconv(y_sel, y_hat_sel)
results["e_axis"] = e_axis
results["fit"] = fit_gaussian(e_axis, np.absolute(h))
results["fit_success"] = results["fit"].covar_ is not None
results["fit"] = fit_gaussian(e_axis, results["h"])
results["fit_success"] = results["fit"].covar is not None
return results
class PromptNotFoundError(Exception):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment