Skip to content
Snippets Groups Projects
Commit 1abb8dd9 authored by Peter Parker's avatar Peter Parker
Browse files

Refs #9361 - Default to standard-named IDF.

In the cases where we're loading IDF's without first loading in the data
(this happens for the system tests but not while using the interface under
normal circumstances), then default to the IDF with name
"INST_Definition.xml" rather than the latest IDF.

This is really just a quick fix so that we can make changes to the new
SANS2D IDF and param name that don't break the system tests.  The real
solution would be to hold off loading any IDF's at all without first
knowing which version of the instrument should be used -- this will be
done under #9361.
parent 9ef2086b
No related merge requests found
......@@ -20,21 +20,9 @@ class BaseInstrument(object):
config = ConfigService.Instance()
self._definition_file = config["instrumentDefinition.directory"]+'/'+instr_filen
self.definition = self.load_instrument()
def load_instrument(self):
"""
Runs LoadInstrument get the parameters for the instrument
@return the instrument parameter data
"""
wrksp = '__'+self._NAME+'instrument_definition'
if not AnalysisDataService.doesExist(wrksp):
CreateWorkspace(OutputWorkspace=wrksp,DataX="1",DataY="1",DataE="1")
#read the information about the instrument that stored in its xml
LoadInstrument(Workspace=wrksp, InstrumentName=self._NAME)
return AnalysisDataService.retrieve(wrksp).getInstrument()
inst_ws_name = self.load_empty()
self.definition = AnalysisDataService.retrieve(inst_ws_name).getInstrument()
def get_default_beam_center(self):
"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment