mantidproject / mslice

Source code for Mantid MSlice
http://mantidproject.github.io/mslice
1 stars 2 forks source link

Error when saving ascii from mslice command line #907

Closed robertapplin closed 1 year ago

robertapplin commented 1 year ago

Describe the bug When attempting to save a workspace to an ascii file from the mslice terminal, there is an index out of range error.

To Reproduce Steps to reproduce the behavior:

  1. Load MARI28540_80meV into Mslice
  2. Attempt to save this workspace by typing the following into the terminal:
    SaveData('MARI28540_80meV', 'test.txt')
  3. There is an error:
    
    147     y = workspace.raw_ws.extractY()
    148     e = workspace.raw_ws.extractE()
    --> 149     ix = [i for i, ax in enumerate(workspace.axes) if 'DeltaE' in ax.units][0]
    150     iy = 0 if ix == 1 else 1
    151 dim_sz = [workspace.raw_ws.getDimension(i).getNBins() for i in range(workspace.raw_ws.getNumDims())]

IndexError: list index out of range



**Expected behavior**
There should be no error and the workspace should be saved successfully as an ascii file.