Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plotting Bug from CutMD #11783

Closed
OwenArnold opened this issue Jan 22, 2015 · 1 comment
Closed

Plotting Bug from CutMD #11783

OwenArnold opened this issue Jan 22, 2015 · 1 comment
Assignees
Labels
Framework Issues and pull requests related to components in the Framework High Priority An issue or pull request that if not addressed is severe enough to postponse a release.
Milestone

Comments

@OwenArnold
Copy link
Contributor

Here's the issue as reported by Russell

#Set things up
hkl = LoadMD(Filename='C:\Russell\Software\Mantid\VATES\VATESdemoSSC15\Templates\FeDataset.nxs' ,FileBackEnd=1)

#Create projections (equivalent of proj in Horace):
projection = CreateEmptyTableWorkspace()
projection.addColumn("double", "u")
projection.addColumn("double", "v")
projection.addColumn("double", "w")
projection.addColumn("double", "offsets")
projection.addColumn("str", "type")
projection.addRow([1, 1, 0, 0, "r"])
projection.addRow([1, -1, 0, 0, "r"]) 
projection.addRow([0, 0, 1, 0, "r"]) 


#QE slice and look at it in the sliceviewer
horace_style = CutMD(hkl,projection, [-3,0.05,3], [0.9,1.1], [-0.1,0.1], [0,4,300], NoPix=True, CheckAxes=False)
sv=plotSlice(horace_style)
sv.setNormalization(2)#set norm to number of events
sv.setXYDim(0,3)#Choose the correct plot axes (0th and 3rd in Python!)
sv.setColorScaleMin(0)#set colour scale limits
sv.setColorScaleMax(1)
sv.setXYLimits(-2,2,0,200)

#If you try to make a 1d cut along (1,1,0), integrating in energy, direct in line mode in the sliceviewer, something weird happens to the integration box – it becomes a trapezium… Nevertheless, if you manage to make the 1d cut this way, and then plotMD, the result has the correct x-axis of (H,H,0).

http://trac.mantidproject.org/mantid/ticket/1d Q cut direct
horace_1d=CutMD(hkl,projection, [-2,0.05,2], [0.9,1.1], [-0.1,0.1], [33,40], NoPix=True, CheckAxes=True)
pm=plotMD(horace_1d,error_bars=1,normalization=mantid.api.MDNormalization.NumEventsNormalization)

#The plotMD here has axes of (H,0,0), with the “correct” (H,H,0) not available as an option.
@OwenArnold
Copy link
Contributor Author

This issue was originally trac ticket 10944

@OwenArnold OwenArnold added High Priority An issue or pull request that if not addressed is severe enough to postponse a release. Framework Issues and pull requests related to components in the Framework labels Jun 3, 2015
@OwenArnold OwenArnold self-assigned this Jun 3, 2015
@OwenArnold OwenArnold added this to the Release 3.4 milestone Jun 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Framework Issues and pull requests related to components in the Framework High Priority An issue or pull request that if not addressed is severe enough to postponse a release.
Projects
None yet
Development

No branches or pull requests

1 participant