Skip to content

Commit

Permalink
Revert "Clear up final inelastic use of v1 API. Refs #7469"
Browse files Browse the repository at this point in the history
This reverts commit 125494d.

Turns out it has already been done somewhere else.
  • Loading branch information
martyngigg committed Jul 23, 2013
1 parent 125494d commit cd299a5
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Forced to use version 1 API.
IS_IN_MANTIDPLOT = False
try:
import mantid
from mantid.simpleapi import *
import mantidplot
from MantidFramework import *
mtd.initialise(False)
from mantidsimple import *
import mantidplot

IS_IN_MANTIDPLOT = True
Expand All @@ -26,13 +28,13 @@ def _load_param_file(self, inst_name):
InstrumentParameters.instrument_name = inst_name
ws_name = "__emptyInst_" + inst_name
if IS_IN_MANTIDPLOT:
idf_loc = config.getInstrumentDirectory()
idf_loc = ConfigService().getInstrumentDirectory()
idf_pattern = os.path.join(idf_loc, "%s_Definition*.xml") % inst_name
import glob
idf_files = glob.glob(idf_pattern)
output = LoadEmptyInstrument(Filename=idf_files[0],
OutputWorkspace=ws_name)
InstrumentParameters._instrument = output.getInstrument()
InstrumentParameters._instrument = output.workspace().getInstrument()

def _self_check(self):
if self._instrument is None:
Expand Down

0 comments on commit cd299a5

Please sign in to comment.