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

GDOS save_ascii outputting data in single line fix #1005

Merged
merged 1 commit into from
Sep 30, 2024

Conversation

mducle
Copy link
Member

@mducle mducle commented Sep 27, 2024

Description of work:

As noted in PR#987, a GDOS cut is "tranposed" such that the data is align along the second dimension. The code to extract a set of x, y, e from the MDHisto workspace explicitly assumes that it is along the first dimension and so fails. This PR fixes this.

To test:

Run this script:

import mslice.cli as mc

ws = mc.Load(Filename='MAR21335_Ei60meV.nxs', OutputWorkspace='MAR21335_Ei60meV')
cut_ws = mc.Cut(ws, CutAxis="DeltaE,0.0,55.0,0.25", IntegrationAxis="|Q|,4.0,10.0,0.0", NormToOne=False, IntensityCorrection='gdos', SampleTemperature=300.0)
mc.save_ascii(cut_ws, 'cut_gdos.txt')

cut_ws = mc.Cut(ws, CutAxis="DeltaE,0.0,55.0,0.25", IntegrationAxis="|Q|,4.0,10.0,0.0", NormToOne=False, IntensityCorrection=False, SampleTemperature=None)
mc.save_ascii(cut_ws, 'cut_sqe.txt')

and check that both output text files have three data columns. The datafile is included in Mantid test files.

Fixes #1004.

@SilkeSchomann SilkeSchomann self-assigned this Sep 30, 2024
Copy link
Collaborator

@SilkeSchomann SilkeSchomann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix works well and code looks good 👍🏻

@SilkeSchomann SilkeSchomann merged commit e791cd1 into main Sep 30, 2024
2 checks passed
@SilkeSchomann SilkeSchomann deleted the 1004_save1ddos branch September 30, 2024 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Saved gDOS cuts ascii files have all data values in a single line
2 participants