From deef924ef0dc62dae9ad624fd82bfdd68a589280 Mon Sep 17 00:00:00 2001 From: toqduj Date: Wed, 8 May 2024 13:50:02 +0200 Subject: [PATCH] Fixing FutureWarning --- src/mcsas3/McData1D.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mcsas3/McData1D.py b/src/mcsas3/McData1D.py index a30cb51..5821b7f 100644 --- a/src/mcsas3/McData1D.py +++ b/src/mcsas3/McData1D.py @@ -213,7 +213,12 @@ def reBin( binDat.loc[binN, "Q"] = dfRange.Q.mean(skipna=True) binDat.loc[binN, "QStd"] = dfRange.Q.std(ddof=1, skipna=True) binDat.loc[binN, "QSEM"] = dfRange.Q.sem(ddof=1, skipna=True) - binDat.loc[binN, "QError"] = np.sqrt(((dfRange.QSigma) ** 2).sum()) / len(dfRange) + binDat.loc[binN, "QError"] = binDat.loc[binN, "Q"] * QEMin + + if "QSigma" in dfRange.keys(): + binDat.loc[binN, "QError"] = np.sqrt(((dfRange.QSigma) ** 2).sum()) / len(dfRange) + + binDat.loc[binN, "QSigma"] = np.max( [ binDat.loc[binN, "QSEM"],