You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Anders this is the problem that I talked to you about, the instrument loses its parameters on the second loading. At the moment we are explictly running populateInstrumentParameters() in LoadRaw and the HFIR equivalent LoadSpice2D.
Below is a script from Mathieu where he was runing LoadSpice2D twice in combination with LoadEmptyInstrument and it lost parameters. The script works OK now after they added the populateInstrumentParameters() line but remove it and it doesn't work.
Can you fix this? Let me know.
Cheers,
Steve
Hey guys,
I’m having a problem loading parameters from the parameters.xml file. It works fine when I load a data file normally, but the parameters are lost when LoadEmptyInstrument is called beforehand. It seems that the parameters are only loaded in the workspace created by the first call but not the second… Any idea how we should fix this? Run the code below and you’ll see what I mean.
-M
from MantidFramework import *
from mantidsimple import *
mtd.initialise(False)
import os
Original Reporter: Steve Williams
Anders this is the problem that I talked to you about, the instrument loses its parameters on the second loading. At the moment we are explictly running populateInstrumentParameters() in LoadRaw and the HFIR equivalent LoadSpice2D.
Below is a script from Mathieu where he was runing LoadSpice2D twice in combination with LoadEmptyInstrument and it lost parameters. The script works OK now after they added the populateInstrumentParameters() line but remove it and it doesn't work.
Can you fix this? Let me know.
Cheers,
Steve
Hey guys,
I’m having a problem loading parameters from the parameters.xml file. It works fine when I load a data file normally, but the parameters are lost when LoadEmptyInstrument is called beforehand. It seems that the parameters are only loaded in the workspace created by the first call but not the second… Any idea how we should fix this? Run the code below and you’ll see what I mean.
-M
from MantidFramework import *
from mantidsimple import *
mtd.initialise(False)
import os
TEST_DIR = "../../../Test/Data/SANS2D/"
filepath = os.path.join(TEST_DIR, "BioSANS_test_data.xml")
instrpath = "../../../Test/Instrument/BIOSANS_Definition.xml"
success = True
loader = LoadSpice2D(filepath, "test")
test1 = mtd["test"].getInstrument().getComponentByName("detector1").getPos().getZ()==6.0
test2 = mtd['test'].getInstrument().getStringParameter("detector-name")[0] == 'detector1'
LoadEmptyInstrument(instrpath, 'inst')
loader = LoadSpice2D(filepath, "test")
test3 = mtd["test"].getInstrument().getComponentByName("detector1").getPos().getZ()==6.0
test4 = len(mtd['test'].getInstrument().getStringParameter("detector-name")) == 1
test5 = mtd['inst'].getInstrument().getStringParameter("detector-name")[0] == 'detector1'
print "SUCCESS ? "
print test1
print test2
print test3
print test4
print test5
The text was updated successfully, but these errors were encountered: