Ticket #9435 (closed: fixed)
Cannot create Colorfill/SliceViewer plot from output of SofQW3
Reported by: | Martyn Gigg | Owned by: | Martyn Gigg |
---|---|---|---|
Priority: | critical | Milestone: | Release 3.2 |
Component: | GUI | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Owen Arnold |
Description (last modified by Martyn Gigg) (diff)
To reproduce, first fun the following script
Load(Filename=r'MAR11001.raw',OutputWorkspace='MAR11001.raw') GetEi(InputWorkspace='MAR11001.raw',Monitor1Spec='2',Monitor2Spec='3',EnergyEstimate='12') ScaleX(InputWorkspace='MAR11001.raw',OutputWorkspace='11001.spe',Factor='-6536.7077785168231',Operation='Add',InstrumentParameter='DelayTime',Combine='1') MoveInstrumentComponent(Workspace='11001.spe',ComponentName='Moderator',Z='-1.4419999999999999',RelativePosition='0') ConvertUnits(InputWorkspace='11001.spe',OutputWorkspace='11001.spe',Target='DeltaE',EMode='Direct') Rebin(InputWorkspace='11001.spe',OutputWorkspace='11001.spe',Params='-6,0.05,12',PreserveEvents='0') GroupDetectors(InputWorkspace="11001.spe",OutputWorkspace="11001.spe",MapFile=r'mari_res.map',Behaviour='Average') SofQW3(InputWorkspace='11001.spe',OutputWorkspace='sofq',QAxisBinning='0,0.2,5',EMode='Direct')
Try and create a colorfill plot for open the sliceviewer on the sofq workspace, you will get an exception.
Change History
comment:1 Changed 6 years ago by Martyn Gigg
- Status changed from new to assigned
- Description modified (diff)
comment:2 Changed 6 years ago by Martyn Gigg
- Status changed from assigned to inprogress
Allow for histogram-type axes on the vertical axis
The SofQW type algorithms put a histogram-style axis on the vertical axis, meaning there is 1 less spectrum than values on the axis. This needs to be taken into account when creating a raster. Refs #9435
Changeset: 0c427c6fe8edf8908fa49a3d93584bd372721138
comment:3 Changed 6 years ago by Martyn Gigg
- Status changed from inprogress to verify
- Resolution set to fixed
Branch: bugfix/9435_fix_colorfill_sofqw3_output
Tester: The script in the description generates an plot of S(Q,W), called sofq Check that:
- a standard colorfill plot can be generated and
- the slice viewer can be opened on the result.
comment:4 Changed 6 years ago by Owen Arnold
- Status changed from verify to verifying
- Tester set to Owen Arnold
comment:5 Changed 6 years ago by Martyn Gigg
- Status changed from verifying to reopened
- Resolution fixed deleted
I need to reopen this to look at a user submitted bug about something similar
comment:6 Changed 6 years ago by Martyn Gigg
- Status changed from reopened to inprogress
Have SpectraAxis treat values as in bins when asking for index.
Refs #9435
Changeset: a67ff11da0693aad179aa3b52668fcbb75452048
comment:7 Changed 6 years ago by Martyn Gigg
Specialise NumericAxis to assume bin edges
Refs #9435
Changeset: 22c529e5e880a47c06ac2bc8ee2a377bdf49c45c
comment:8 Changed 6 years ago by Martyn Gigg
Numeric axes can now find index assuming value is in a bin.
Refs #9435
Changeset: bb609ef96ec6e17bb88b7058041e12033cd50524
comment:9 Changed 6 years ago by Martyn Gigg
Fix a few instances to use the new BinEdgeAxis class.
Refs #9435
Changeset: c2109cf75e430317cf37cc9b3735bf8b92fa647c
comment:10 Changed 6 years ago by Martyn Gigg
Fix MatrixWorkspace IMDDimensions implementations of bin lengths.
They need to take into account whether the data is actually binned or not. Refs #9435
Changeset: 94d6f7adf99eb966ade4fe2f55de75b8bde5bfe5
comment:11 Changed 6 years ago by Martyn Gigg
Implement lazy caching in SpectraAxis for looking up a spectrum value.
Refs #9435
Changeset: 1990471eb2a462e64f2e7e61f81bc92b23929af2
comment:12 Changed 6 years ago by Martyn Gigg
Use same raster data source for slice viewer and colorfill plot
The caching in the framework means that the performance is now acceptable in both cases. Refs #9435
Changeset: f8c6a9325e1677062d16514dacb11219c5afe514
comment:13 Changed 6 years ago by Martyn Gigg
Use BinEdgeAxis class in CreateWorkspace
Refs #9435
Changeset: 3744f5ab446f5998913eb02d1bad3099b9413b6f
comment:14 Changed 6 years ago by Martyn Gigg
Fix all places using SpectrumAxis::setValue
Replace them with proper call to setSpectrumNo Refs #9435
Changeset: e4eeac92082e6187528c2f3148a5a8a121030d0a
comment:15 Changed 6 years ago by Martyn Gigg
Use BinEdgeAxis instead of NumericAxis for histogram axes.
Refs #9435
Changeset: 20e6aad967da22c993a0bc315a2895cc75a9be5d
comment:16 Changed 6 years ago by Martyn Gigg
Remove SpectraAxis::setValue calls in AlgorithmsTest.
The workspace spectra are now modified directly. Refs #9435
Changeset: 872ebcdef0cf5cb794bbf5687167bb45cdc05197
comment:17 Changed 6 years ago by Martyn Gigg
comment:18 Changed 6 years ago by Martyn Gigg
Remove SpectraAxis::setValue calls in DataHandlingTests
Refs #9435
Changeset: bbbf07058601ccbced0099d0e7d817918444e62b
comment:19 Changed 6 years ago by Martyn Gigg
Remove SpectraAxis::setValue usage in CurveFitting tests.
Refs #9435
Changeset: 2da7a43a3cc6deda11a079d14ec2808499c9ca93
comment:20 Changed 6 years ago by Martyn Gigg
comment:21 Changed 6 years ago by Martyn Gigg
- Status changed from inprogress to verify
- Resolution set to fixed
Branch: bugfix/9435_fix_colorfill_sofqw3_output
Tester: The script in the description should now allow both the colorfill plot and sliceviewer to view the sofq output. In addition this has also fixed a user-reported error that the plots were missing a row. Text from bug:
Previously, if for example there were spectra with numbers or Y values 1,2,3 then there would be 3 rows of "large pixels" at Y coordinates 0.5 to 1.5, 1.5 to 2.5, and 2.5 to 3.5. This was about as good as can be done given that the Y axis has bin centres and not boundaries. Now we have only 2 rows, with spectrum 1 missing, spectrum 2 displayed from y=1.0 to y=2.0 and spectrum 3 displayed from y=2.0 to y=3.0.
To best illustrate this use a simple 3 spectra workspace each with a different colour:
row_ws = CreateWorkspace(DataX="1,2,3,4,5,6,1,2,3,4,5,6,1,2,3,4,5,6", DataY="1,1,1,1,1,2,2,2,2,2,3,3,3,3,3",NSpec=3)
and viewing it as a colorfill plot or in the slice viewer should show 3 bands of colour (assuming that the top end of the colormap is not the same colour as the background.) I would suggest the rainbow colormap to show this most easily.
comment:23 Changed 6 years ago by Owen Arnold
- Status changed from verifying to closed
Merge remote-tracking branch 'origin/bugfix/9435_fix_colorfill_sofqw3_output'
Full changeset: e5f12d2e902ae03764fe0fcd2687b7556553dd40
comment:24 Changed 6 years ago by Owen Arnold
All OK. nice work.
comment:25 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 10278