Ticket #10964 (closed: fixed)
LoadParameterFile should try to get a file from the instrument directory if the absolute path is not valid
Reported by: | Dan Nixon | Owned by: | Dan Nixon |
---|---|---|---|
Priority: | major | Milestone: | Release 3.4 |
Component: | Framework | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Harry Jeffery |
Description
This is done in LoadEmptyInstrument so should be done here also for consistency.
Change History
comment:2 Changed 6 years ago by Dan Nixon
To test:
- See that no unit or system tests are broken.
- Create a workspace with an instrument: CreateSimulationWorkspace(Instrument='IRIS', BinParams='-0.5,0.05,0.5', OutputWorkspace='inst')
- Look at a property: print mtd['inst'].getInstrument().getStringParameter('analyser')[0]
- This should be 'graphite'
- Run LoadParameterFile with a filename only: LoadParameterFile(Workspace='inst', Filename='IRIS_fmica_006_Parameters.xml')
- Look at the same property: print mtd['inst'].getInstrument().getStringParameter('analyser')[0]
- Should now be 'fmica'
Without the fix you will get the following error:
Error in execution of algorithm LoadParameterFile: File not found: IRIS_mica_006_Parameters.xml. Unable to parse File: in IRIS_mica_006_Parameters.xml
comment:3 Changed 6 years ago by Dan Nixon
- Status changed from assigned to inprogress
Find the file if it is not already a valid path
Refs #10964
Changeset: 20747d6c0c403f68a04c825f2e48f0821c46445f
comment:4 Changed 6 years ago by Dan Nixon
- Status changed from inprogress to verify
- Resolution set to fixed
comment:5 Changed 6 years ago by Harry Jeffery
- Status changed from verify to verifying
- Tester set to Harry Jeffery
comment:6 Changed 6 years ago by Harry Jeffery
- Status changed from verifying to closed
Merge remote-tracking branch 'origin/bugfix/10964_loadparameterfile_find_file'
Full changeset: c0e42251e60d0449981a7191fc8997a186f8fdc1
Note: See
TracTickets for help on using
tickets.