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

Reorder by X-axis #8636

Closed
OwenArnold opened this issue Aug 21, 2013 · 2 comments
Closed

Reorder by X-axis #8636

OwenArnold opened this issue Aug 21, 2013 · 2 comments
Assignees
Labels
Framework Issues and pull requests related to components in the Framework
Milestone

Comments

@OwenArnold
Copy link
Contributor

This relates to an issue reported by the user, where they have loaded ascii data in which the x-values are descending. It proves impossible to work with some features of mantid such as plotting if you do this.

The fix is simply to ensure that the x-axis is ordered smallest to largest, and that the y and e data also follow this ordering.

Using the data files attached and the following script, you can replicate this problem. Not that the plots generated do not graph the data properly as it is not ordered as expected.

# Load the text data.  Note, the erors bars are 0.0 due to the way they were processed earlier. 
Load(Filename=DataDir+'polref8481.dat',OutputWorkspace='r8481',Unit='MomentumTransfer')
Load(Filename=DataDir+'polref8483.dat',OutputWorkspace='r8483',Unit='MomentumTransfer')

# Display the data to see what we're starting with 
plotSpectrum([mtd['r8481'],mtd['r8483']],0)
# Notice that the default scaling is broken when the data has 

Rebin(InputWorkspace='r8481',OutputWorkspace='r8481',Params='0.009,-0.04,0.034',PreserveEvents='0')
Rebin(InputWorkspace='r8483',OutputWorkspace='r8483',Params='0.027,-0.04,0.150',PreserveEvents='0')
@OwenArnold
Copy link
Contributor Author

This issue was originally trac ticket 7791

@OwenArnold
Copy link
Contributor Author

@OwenArnold OwenArnold added the Framework Issues and pull requests related to components in the Framework label Jun 3, 2015
@OwenArnold OwenArnold self-assigned this Jun 3, 2015
@OwenArnold OwenArnold added this to the Release 3.0 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
Projects
None yet
Development

No branches or pull requests

1 participant