Ticket #9009 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Fix Units on ConvertMDHistoToMatrixWorkspace

Reported by: Owen Arnold Owned by: Owen Arnold
Priority: critical Milestone: Release 3.1.1
Component: Diffraction Keywords: PatchCandidate
Cc: Blocked By:
Blocking: #8992 Tester: Peter Parker

Description

The following illustrates the problem.

CreateMDWorkspace(Dimensions='2',EventType='MDEvent',Extents='-10,10,-10,10',Names='Q_lab_x,Q_lab_y',Units='A,B',OutputWorkspace='test')
FakeMDEventData(InputWorkspace='test',UniformParams='1000',PeakParams='100000,0,0,1')
# Create a line cut
line_md = BinMD(InputWorkspace='test',AxisAligned='0',BasisVector0='X,units,0.888154,0.459545',BasisVector1='Y,units,-0.459545,0.888154',Translation='-4.93562,-2.3918',OutputExtents='0,9.61632,-0.1,0.1',OutputBins='100,1')
line_2d = ConvertMDHistoToMatrixWorkspace(line_md)
plotMD(line_md)
plotSpectrum(line_2d, 0)

These plots should be equivalent, but the X-units are wrong in the line_2d cut. This is because the Convert algorithm isn't properly sourcing the coordinate transformations. The default should be that it does. An optional parameter expressing the need to preserve the existing behaviour would be desirable.

Change History

comment:1 Changed 7 years ago by Owen Arnold

  • Status changed from new to inprogress

refs #9009. For starters - need a test suite.

No test coverage for existing functionality. This is required first.

Changeset: 665cab907fd19a8780a96fb332226c030d65473b

comment:2 Changed 7 years ago by Owen Arnold

refs #9009. Add desired transformation capabilities.

Transform to original coordinates if workspace is present.

Changeset: f68997c977c9d04ed26425c725687fcc755621a6

comment:3 Changed 7 years ago by Owen Arnold

refs #9009. Design and implement coord trans test.

Unit tests now contain a test which checks the coordinate transformations applied to the output MatrixWorkspace.

Changeset: 73b5742714a2d4afdfce990f3c019f14d5cd949a

comment:4 Changed 7 years ago by Owen Arnold

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

comment:5 Changed 7 years ago by Peter Parker

  • Status changed from verify to verifying
  • Tester set to Peter Parker

comment:6 Changed 7 years ago by Peter Parker

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/feature/9009_fix_conversion'

Full changeset: 9ee190c6fb4aa4b9fa7e5c5ed5371b506bef849a

comment:7 Changed 7 years ago by Peter Parker

The script shows that the transforms are now taken into account. Unit tests seem to cover the functionality and are passing.

comment:8 Changed 7 years ago by Nick Draper

  • Milestone changed from Release 3.2 to Release 3.1.1

Moved to patch release 3.1.1

comment:9 Changed 7 years ago by Owen Arnold

refs #9009. For starters - need a test suite.

No test coverage for existing functionality. This is required first.

Changeset: 028b22af77ad1ba09d44202c70c10182eda809a1

comment:10 Changed 7 years ago by Owen Arnold

refs #9009. Add desired transformation capabilities.

Transform to original coordinates if workspace is present.

Changeset: d51c54589e78d2a31f7c38e62a2e8c7acc951e59

comment:11 Changed 7 years ago by Owen Arnold

refs #9009. Design and implement coord trans test.

Unit tests now contain a test which checks the coordinate transformations applied to the output MatrixWorkspace.

Changeset: b5e5bda6f6b1904c394723eecf515e6331e8d811

comment:12 Changed 7 years ago by Russell Taylor

The above 3 commits come from pulling the work in this ticket into the patch release branch.

comment:13 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 9852

Note: See TracTickets for help on using tickets.