From 47f362eb4d2f742728993f5c4a39cd390621baba Mon Sep 17 00:00:00 2001 From: Mathieu Doucet Date: Thu, 7 Mar 2024 18:42:45 -0500 Subject: [PATCH] fix import --- reduction/lr_reduction/event_reduction.py | 29 ++++++++++++----------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/reduction/lr_reduction/event_reduction.py b/reduction/lr_reduction/event_reduction.py index 243265c..2125adb 100644 --- a/reduction/lr_reduction/event_reduction.py +++ b/reduction/lr_reduction/event_reduction.py @@ -6,8 +6,9 @@ import mantid.simpleapi as api import numpy as np -import background -import DeadTimeCorrection.call as DeadTimeCorrection +from . import background +from . import DeadTimeCorrection as _dtc +import _dtc.call as SingleReadoutDeadTimeCorrection def get_wl_range(ws): @@ -242,22 +243,22 @@ def get_dead_time_correction(self): tof_min = self._ws_sc.getTofMin() tof_max = self._ws_sc.getTofMax() - corr_ws = DeadTimeCorrection(InputWorkspace=self._ws_sc, - DeadTime=self.DEAD_TIME, - TOFStep=self.DEAD_TIME_TOF_STEP, - Paralyzable=self.paralyzable, - TOFRange=[tof_min, tof_max], - OutputWorkspace="corr") + corr_ws = SingleReadoutDeadTimeCorrection(InputWorkspace=self._ws_sc, + DeadTime=self.DEAD_TIME, + TOFStep=self.DEAD_TIME_TOF_STEP, + Paralyzable=self.paralyzable, + TOFRange=[tof_min, tof_max], + OutputWorkspace="corr") corr_sc = corr_ws.readY(0) wl_bins = corr_ws.readX(0) / self.constant # Direct beam workspace - corr_ws = DeadTimeCorrection(InputWorkspace=self._ws_db, - DeadTime=self.DEAD_TIME, - TOFStep=self.DEAD_TIME_TOF_STEP, - Paralyzable=self.paralyzable, - TOFRange=[tof_min, tof_max], - OutputWorkspace="corr") + corr_ws = SingleReadoutDeadTimeCorrection(InputWorkspace=self._ws_db, + DeadTime=self.DEAD_TIME, + TOFStep=self.DEAD_TIME_TOF_STEP, + Paralyzable=self.paralyzable, + TOFRange=[tof_min, tof_max], + OutputWorkspace="corr") corr_db = corr_ws.readY(0) # Flip the correction since we are going from TOF to Q