Commit 0c7978b0 authored by Thomas Vincent's avatar Thomas Vincent

stop using get_q[x|y|z]_result

parent 7db9d858
......@@ -260,12 +260,12 @@ class FitView(Qt.QMainWindow):
qyPeakParams[process] = {}
qzPeakParams[process] = {}
for result in results:
qxPeakParams[process][result] = self.__fitH5.get_qx_result(
entry, process, result)[xIdx]
qyPeakParams[process][result] = self.__fitH5.get_qy_result(
entry, process, result)[xIdx]
qzPeakParams[process][result] = self.__fitH5.get_qz_result(
entry, process, result)[xIdx]
qxPeakParams[process][result] = self.__fitH5.get_axis_result(
entry, process, result, 0)[xIdx]
qyPeakParams[process][result] = self.__fitH5.get_axis_result(
entry, process, result, 1)[xIdx]
qzPeakParams[process][result] = self.__fitH5.get_axis_result(
entry, process, result, 2)[xIdx]
# Get QSpace data and project to axes
with self.__qspaceH5:
......
......@@ -224,36 +224,6 @@ class FitH5(XsocsH5Base):
axis=axis_name)
return self._get_array_data(result_path)
def get_qx_result(self, entry, process, result):
"""Returns the results (qx) for the given entry/process/result name.
:param str entry:
:param str process:
:param str result:
:return: numpy.ndarray
"""
return self.get_axis_result(entry, process, result, FitH5QAxis.qx_axis)
def get_qy_result(self, entry, process, result):
"""Returns the results (qy) for the given entry/process/result name.
:param str entry:
:param str process:
:param str result:
:return: numpy.ndarray
"""
return self.get_axis_result(entry, process, result, FitH5QAxis.qy_axis)
def get_qz_result(self, entry, process, result):
"""Returns the results (qz) for the given entry/process/result name.
:param str entry:
:param str process:
:param str result:
:return: numpy.ndarray
"""
return self.get_axis_result(entry, process, result, FitH5QAxis.qz_axis)
def get_background_mode(self, entry):
"""Returns the background subtraction mode used
......
......@@ -113,16 +113,16 @@ def _cmp_fit_h5_results(test_case,
compare_arrays = np.array_equal
for result in ref_results:
ref_qx = ref_h5.get_qx_result(entry, process, result)
this_qx = this_h5.get_qx_result(entry, process, result)
ref_qx = ref_h5.get_axis_result(entry, process, result, 0)
this_qx = this_h5.get_axis_result(entry, process, result, 0)
test_case.assertTrue(compare_arrays(ref_qx, this_qx))
ref_qy = ref_h5.get_qy_result(entry, process, result)
this_qy = this_h5.get_qy_result(entry, process, result)
ref_qy = ref_h5.get_axis_result(entry, process, result, 1)
this_qy = this_h5.get_axis_result(entry, process, result, 1)
test_case.assertTrue(compare_arrays(ref_qy, this_qy))
ref_qz = ref_h5.get_qz_result(entry, process, result)
this_qz = this_h5.get_qz_result(entry, process, result)
ref_qz = ref_h5.get_axis_result(entry, process, result, 2)
this_qz = this_h5.get_axis_result(entry, process, result, 2)
test_case.assertTrue(compare_arrays(ref_qz, this_qz))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment