Ticket #7151 (assigned)

Opened 7 years ago

Last modified 5 years ago

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

comment:1 Changed 7 years ago by Martyn Gigg

  • Milestone changed from Release 2.6 to Release 2.7

Batch move to 2.7

comment:2 Changed 7 years ago by Nick Draper

  • Milestone changed from Release 2.7 to Backlog

comment:3 Changed 7 years ago by Nick Draper

  • Component changed from Mantid to Framework

comment:4 Changed 7 years ago by Nick Draper

  • Status changed from new to assigned

Bulk move to assigned at the introduction of the triage step

comment:5 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 7997

Note: See TracTickets for help on using tickets.