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.
+ 71
− 31
@@ -60,22 +60,61 @@ def fwhm(x: np.ndarray, y: np.ndarray) -> float:
@@ -86,7 +125,7 @@ def fit_gaussian(x: np.ndarray, y: np.ndarray) -> lmfit.ModelResult:
@@ -99,7 +138,7 @@ def get_resolution(y: np.ndarray, y_hat: np.ndarray, e: np.ndarray,
@@ -111,8 +150,11 @@ def get_resolution(y: np.ndarray, y_hat: np.ndarray, e: np.ndarray,
@@ -380,7 +422,8 @@ class SelectRelevantLowResolution(TransformerMixin, BaseEstimator):
@@ -797,7 +840,8 @@ class Model(TransformerMixin, BaseEstimator):
@@ -1014,17 +1058,21 @@ class Model(TransformerMixin, BaseEstimator):
@@ -1057,15 +1105,6 @@ class Model(TransformerMixin, BaseEstimator):
@@ -1074,13 +1113,14 @@ class Model(TransformerMixin, BaseEstimator):