Calculate SNR and some bug fixes
Compare changes
- Danilo Ferreira de Lima authored
Calculate SNR. Check if resolution fit fails and add nans. Regularize H calculation. Pay attention to deactivated channels when estimating pedestal.
+ 73
− 31
@@ -60,22 +60,63 @@ def fwhm(x: np.ndarray, y: np.ndarray) -> float:
@@ -86,7 +127,7 @@ def fit_gaussian(x: np.ndarray, y: np.ndarray) -> lmfit.ModelResult:
@@ -99,7 +140,7 @@ def get_resolution(y: np.ndarray, y_hat: np.ndarray, e: np.ndarray,
@@ -111,8 +152,11 @@ def get_resolution(y: np.ndarray, y_hat: np.ndarray, e: np.ndarray,
@@ -380,7 +424,8 @@ class SelectRelevantLowResolution(TransformerMixin, BaseEstimator):
@@ -797,7 +842,8 @@ class Model(TransformerMixin, BaseEstimator):
@@ -1014,17 +1060,21 @@ class Model(TransformerMixin, BaseEstimator):
@@ -1057,15 +1107,6 @@ class Model(TransformerMixin, BaseEstimator):
@@ -1074,13 +1115,14 @@ class Model(TransformerMixin, BaseEstimator):