Ticket #7151 (assigned)
PythonAlgorithms: Error from WorkspaceFactory.create when fed output from other Python algorithm
Reported by: | Martyn Gigg | Owned by: | Martyn Gigg |
---|---|---|---|
Priority: | major | Milestone: | Backlog |
Component: | Framework | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: |
Description
James Lord has spotted:
I have a simple algorithm (attached) to add a linear correction to the data in a workspace. It's fine with a freshly loaded run file but fails with a strange error if I run it on the output of "ConjoinSpectra()": Error in execution of algorithm Apply2DLinearCorrection: __class__ assignment: 'MatrixWorkspace' object layout differs from 'MatrixWorkspace' at line 18 in 'C:/MantidInstall/UserAlgorithms/Apply2DLinearCorrection.py' What's wrong? The offending line is simply ows=WorkspaceFactory.create(iws) as I want a copy of the workspace with the same axis labels, number of bins, etc. (I was actually using my hacked version of ConjoinSpectra which makes the Y (spectrum) axis numeric, for doing 2D plots, and which I'll upload to the Script Repository soon, but have reproduced the same behaviour with the standard one) James Lord.
And also
Follow up to this: if I feed the offending workspace from ConjoinSpectra() through Transpose() I can now run my algorithm on it successfully, so that seems to clear up the different object layout or whatever. I haven't done a thorough search of which algorithms cause or cure this bug.
Change History
Note: See
TracTickets for help on using
tickets.
Batch move to 2.7