Skip to content

Commit e97fb34

Browse files
Merge pull request #294 from neutrons/helperfunction_move
Follow move of get_spectrum
2 parents 6e5c151 + 5753aa1 commit e97fb34

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

addie/utilities/workspaces.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import math
22
import numpy as np
33
from mantid.api import AnalysisDataService
4-
import mantid.plots.helperfunctions
4+
try:
5+
from mantid.plots.datafunctions import get_spectrum # mantid >4.2
6+
except ImportError:
7+
from mantid.plots.helperfunctions import get_spectrum # mantid <=4.2
58

69

710
def calculate_bank_angle(name):
@@ -33,8 +36,8 @@ def get_ws(name):
3336

3437
def get_ws_data(ws_name, wkspIndex=0, withDy=True):
3538
wksp = get_ws(ws_name)
36-
x, y, dy, _ = mantid.plots.helperfunctions.get_spectrum(
37-
wksp, wkspIndex, False, withDy=withDy, withDx=False)
39+
x, y, dy, _ = get_spectrum(wksp, wkspIndex, False,
40+
withDy=withDy, withDx=False)
3841
return x, y, dy
3942

4043

0 commit comments

Comments
 (0)