Ticket #3393 (closed: fixed)

Opened 9 years ago

Last modified 5 years ago

ConvertToPointData axis problem?

Reported by: Andrei Savici Owned by: Andrei Savici
Priority: minor Milestone: Release 2.5.3
Component: Mantid Keywords: PatchCandidate,Released
Cc: Blocked By:
Blocking: Tester: Russell Taylor

Description

I've created a workspace using SofQW, so an axis was added. Then I tried to convert to point data. All the information about the additional axis was lost. Here is how to reproduce:

Load(Filename='CNCS_7860_event.nxs',OutputWorkspace='c')
ConvertUnits(InputWorkspace='c',OutputWorkspace='c',Target='DeltaE',EMode='Direct',EFixed='3')
Rebin(InputWorkspace='c',OutputWorkspace='c',Params='-2,0.1,2',PreserveEvents='0')
SofQW(InputWorkspace='c',OutputWorkspace='w1',QAxisBinning='0.1,0.02,3',EMode='Direct',EFixed='3')
ConvertToPointData(InputWorkspace='w1',OutputWorkspace='w2')
Transpose(InputWorkspace='w1',OutputWorkspace='w3')
Transpose(InputWorkspace='w3',OutputWorkspace='w4')

If you plot any spectra from w2 and the corresponding one from w4, they are identical. However, the Color Fill Plot on w2 will show only a line at 0

Change History

comment:1 Changed 9 years ago by Andrei Savici

Note: Transpose converts correctly to point type, so ConvertToPointData is equivalent to transposing twice

comment:2 Changed 9 years ago by Nick Draper

  • Owner set to Anyone
  • Status changed from new to assigned

comment:3 Changed 9 years ago by Nick Draper

  • Milestone changed from Iteration 30 to Iteration 31

Bulk move of tickets to iteration 31 at the iteration 30 code freeze

comment:4 Changed 9 years ago by Nick Draper

  • Milestone changed from Iteration 32 to Iteration 33

Moved to iteration 33 at iteration 32 code freeze

comment:5 Changed 8 years ago by Nick Draper

  • Milestone changed from Release 2.1 to Release 2.2

Moved at end of release 2.1

comment:6 Changed 8 years ago by Nick Draper

  • Milestone changed from Release 2.2 to Release 2.3

comment:7 Changed 8 years ago by Nick Draper

  • Milestone changed from Release 2.3 to Release 2.4

Moved to milestone 2.4

comment:8 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:9 Changed 7 years ago by Andrei Savici

  • Owner changed from Anyone to Andrei Savici
  • Status changed from assigned to accepted
  • Milestone changed from Release 2.5 to Release 2.6

comment:10 Changed 7 years ago by Andrei Savici

The problem seems to be that SofQW vertical axis has 1 more value than the number of spectra. When a workspace is created from a parent, it deletes the vertical axis if #spectra is different than # values. Quick fix: copy the vertical axis in XDataConverter

comment:11 Changed 7 years ago by Andrei Savici

Copy vertical axis. Refs #3393

In the unit test for ConvertTo point data check the vertical axis

Changeset: f17a48b94845942b2a45d3bdd843807c57894a6a

comment:12 Changed 7 years ago by Andrei Savici

Added checks for vertical axis values. Refs #3393

Changeset: 48046ea3ffb32fa0e02cc6c09efbacf366945350

comment:13 Changed 7 years ago by Andrei Savici

Copy vertical axis. Refs #3393

In the unit test for ConvertTo point data check the vertical axis

Changeset: f17a48b94845942b2a45d3bdd843807c57894a6a

comment:14 Changed 7 years ago by Andrei Savici

Added checks for vertical axis values. Refs #3393

Changeset: 48046ea3ffb32fa0e02cc6c09efbacf366945350

comment:15 Changed 7 years ago by Andrei Savici

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

bugfix/3393_ConvertToPointData_axis

comment:16 Changed 7 years ago by Russell Taylor

  • Status changed from verify to verifying
  • Tester set to Russell Taylor

comment:17 Changed 7 years ago by Andrei Savici

Copy vertical axis. Refs #3393

In the unit test for ConvertTo point data check the vertical axis

Changeset: f17a48b94845942b2a45d3bdd843807c57894a6a

comment:18 Changed 7 years ago by Andrei Savici

Added checks for vertical axis values. Refs #3393

Changeset: 48046ea3ffb32fa0e02cc6c09efbacf366945350

comment:19 Changed 7 years ago by Russell Taylor

  • Status changed from verifying to closed

I suppose it would be more efficient to only copy the axis if it really was a different length (otherwise the copy will already have happened), but I'll let it go. These algorithms shouldn't be used very often anyway.

comment:20 Changed 7 years ago by Andrei Savici

  • Keywords Patch candidate added

comment:21 Changed 7 years ago by Andrei Savici

  • Keywords PatchCandidate added; Patch candidate removed

comment:22 Changed 7 years ago by Nick Draper

  • Milestone changed from Release 2.6 to Release 2.5.3

comment:23 Changed 7 years ago by Andrei Savici

Copy vertical axis. Refs #3393

In the unit test for ConvertTo point data check the vertical axis

Changeset: 9358d019c99022d93d6acf773003726ceb261ec0

comment:24 Changed 7 years ago by Andrei Savici

Added checks for vertical axis values. Refs #3393

Changeset: d42048e251f993d7a88a205d1ca4b55bd8225017

comment:25 Changed 7 years ago by Nick Draper

  • Keywords PatchCandidate,Released added; PatchCandidate removed

comment:26 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 4240

Note: See TracTickets for help on using tickets.