From bba8b04997a715d9d037dc7a143534578d90ca09 Mon Sep 17 00:00:00 2001 From: ahmedk <karim.ahmed@xfel.eu> Date: Tue, 9 Nov 2021 12:57:02 +0100 Subject: [PATCH] remove prettyPlotting and use get_run_value --- notebooks/pnCCD/Characterize_pnCCD_Dark_NBC.ipynb | 5 +---- notebooks/pnCCD/Correct_pnCCD_NBC.ipynb | 2 -- src/cal_tools/pnccdlib.py | 12 ++++-------- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/notebooks/pnCCD/Characterize_pnCCD_Dark_NBC.ipynb b/notebooks/pnCCD/Characterize_pnCCD_Dark_NBC.ipynb index 5638c1e54..1cbdcd490 100644 --- a/notebooks/pnCCD/Characterize_pnCCD_Dark_NBC.ipynb +++ b/notebooks/pnCCD/Characterize_pnCCD_Dark_NBC.ipynb @@ -108,10 +108,7 @@ "profiler.disable()\n", "\n", "from XFELDetAna import xfelpyanatools as xana\n", - "from XFELDetAna import xfelpycaltools as xcal\n", - "from XFELDetAna.plotting.util import prettyPlotting\n", - "\n", - "prettyPlotting=True" + "from XFELDetAna import xfelpycaltools as xcal" ] }, { diff --git a/notebooks/pnCCD/Correct_pnCCD_NBC.ipynb b/notebooks/pnCCD/Correct_pnCCD_NBC.ipynb index 77c281cf2..6e83b31d2 100644 --- a/notebooks/pnCCD/Correct_pnCCD_NBC.ipynb +++ b/notebooks/pnCCD/Correct_pnCCD_NBC.ipynb @@ -110,12 +110,10 @@ "from prettytable import PrettyTable\n", "\n", "%matplotlib inline\n", - "prettyPlotting=True\n", "\n", "import XFELDetAna.xfelprofiler as xprof\n", "from XFELDetAna import xfelpyanatools as xana\n", "from XFELDetAna import xfelpycaltools as xcal\n", - "from XFELDetAna.plotting.util import prettyPlotting\n", "from cal_tools import pnccdlib\n", "from cal_tools.tools import (\n", " get_constant_from_db_and_time,\n", diff --git a/src/cal_tools/pnccdlib.py b/src/cal_tools/pnccdlib.py index 38a3adde3..98594427e 100644 --- a/src/cal_tools/pnccdlib.py +++ b/src/cal_tools/pnccdlib.py @@ -25,17 +25,13 @@ class PnccdCtrl(): def get_bias_voltage(self): return( - abs(self.run_dc[ - self.mdl_src_temp.format("DAQ_MPOD"), - "u0voltage.value"][0].ndarray()[0]) - ) + abs(self.run_dc.get_run_value( + self.mdl_src_temp.format("DAQ_MPOD"), "u0voltage.value"))) def get_gain(self): return( - self.run_dc[ - self.mdl_src_temp.format("DAQ_GAIN"), - "pNCCDGain.value"][0].ndarray()[0] - ) + self.run_dc.get_run_value( + self.mdl_src_temp.format("DAQ_GAIN"), "pNCCDGain.value")) def get_fix_temperature_top(self): return self.run_dc.get_run_value(self.ctrl_src, "inputA.krdg.value") -- GitLab