Ticket #1457 (closed)
Some problems loading instrument parameters files
Reported by: | Steve Williams | Owned by: | Mathieu Doucet |
---|---|---|---|
Priority: | major | Milestone: | Iteration 24 |
Component: | Keywords: | ||
Cc: | Blocked By: | ||
Blocking: | Tester: | Stuart Campbell |
Description
An error is sometimes produced when accessing parameters from a workspace that's been deleted.
Runing LoadSpice2D twice in combination with LoadEmptyInstrument loses parameters as in the email below
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
Change History
comment:1 Changed 10 years ago by Mathieu Doucet
- Status changed from new to assigned
- Owner changed from Steve Williams to Mathieu Doucet
Note: See
TracTickets for help on using
tickets.