Ticket #6060 (closed: fixed)

Opened 8 years ago

Last modified 5 years ago

MDEventWorkspace does not export ExperimentInfo methods

Reported by: Gesner Passos Owned by: Michael Reuter
Priority: major Milestone: Release 2.5
Component: Mantid Keywords:
Cc: owen.arnold@… Blocked By:
Blocking: Tester: Andrei Savici

Description

When testing #5776, i tried to execute the following script in order to check the log data

Load(Filename='POLREF00004699.nxs',OutputWorkspace='POLREF00004699')
ConvertUnits(InputWorkspace='POLREF00004699',OutputWorkspace='inter_ws',Target='Wavelength',AlignBins='1')
ConvertSpectrumAxis(InputWorkspace='inter_ws',OutputWorkspace='inter_ws_theta',Target='signed_theta')
ConvertToReflectometryQ(InputWorkspace='inter_ws_theta',OutputDimensions='K (incident, final)',Extents='0,0.5,0,0.5',OutputWorkspace='inter_converted')
ws_initial = mtd['POLREF00004699_1']
ws_final = mtd['inter_converted_1']

first_log = ws_initial.run().getLogData()
second_log = ws_final.run().getLogData()

It fails, with the following message:

AttributeError: 'IMDEventWorkspace' object has no attribute 'run'
  at line 12 in ''

With the help of Owen, we found that the MDEventWorkspace declares inheiriting from MultipleExperimentInfos that does not export any method to python API -> PythonInterface/mantid/api/src/Exports/MultipleExperimentInfos.cpp

The unittest, Framework/MDEvents/test/ConvertToReflectometrQTest.h:test_execute suggests, for me, that MDEventWorkspace could export also experiment infos.

Change History

comment:1 Changed 8 years ago by Nick Draper

  • Milestone changed from Release 2.4 to Release 2.5

Moved at the code freeze for release 2.4

comment:2 Changed 8 years ago by Michael Reuter

  • Status changed from new to accepted
  • Owner changed from Anyone to Michael Reuter

comment:3 Changed 8 years ago by Michael Reuter

Refs #6060. Python API call for multiple experiment infos.

Changeset: bfeb28b8d0488d9b7b21915d547cf00c6d81d57e

comment:4 Changed 8 years ago by Michael Reuter

Refs #6060. Adding unit test.

Changeset: b22074f5e4dd8f3a0f6f7b10c9502a0339dbf9fe

comment:5 Changed 8 years ago by Michael Reuter

  • Status changed from accepted to verify
  • Resolution set to fixed

To test: Run the code above but changing the last line to

second_log = ws_final.getExperimentInfo(0).run().getLogData()

comment:6 Changed 8 years ago by Andrei Savici

  • Status changed from verify to verifying
  • Tester set to Andrei Savici

comment:7 Changed 8 years ago by Andrei Savici

  • Status changed from verifying to closed

comment:8 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 6906

Note: See TracTickets for help on using tickets.