From f8b3c7128ad707e19dd4f7f240e54c5d99e9c2e7 Mon Sep 17 00:00:00 2001 From: "Abdulkadir, Ahmed" Date: Wed, 10 Aug 2022 04:50:59 +0200 Subject: [PATCH] Add arguments to choose SPARE-* column names --- NiBAx/core/model/datamodel.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/NiBAx/core/model/datamodel.py b/NiBAx/core/model/datamodel.py index e33a051da..e342569f7 100644 --- a/NiBAx/core/model/datamodel.py +++ b/NiBAx/core/model/datamodel.py @@ -236,7 +236,8 @@ def GetDataStatistics(self): return stats - def AddSparesToDataModel(self,spares): - self.data.loc[:,'SPARE_AD'] = spares['SPARE_AD'] - self.data.loc[:,'SPARE_BA'] = spares['SPARE_BA'] + def AddSparesToDataModel(self,spares,SPARE_AD='SPARE_AD', + SPARE_BA='SPARE_BA'): + self.data.loc[:,SPARE_AD] = spares['SPARE_AD'] + self.data.loc[:,SPARE_BA] = spares['SPARE_BA'] self.data_changed.emit()