pace-neutrons / pace-python

Python module of the PACE inelastic neutron data analysis suite of programs.
GNU General Public License v3.0
3 stars 4 forks source link

bragg_positions_view error #23

Closed mducle closed 2 years ago

mducle commented 2 years ago

Issue

Running bragg_positions_view gives an error due to string (from keyboard) parsing in Python/Matlab bridge.

How to reproduce

sqw_file = 'iron.sqw'   # Use Iron dataset from EDATC
bragg_peaks = np.array([[4.,0.,0.], [2.,0.,0.], [1.,1.,0.], [4.,4.,0.], [1.,0.,1.]])
rlu0, width, wcut, wpeak = m.bragg_positions(sqw_file, bragg_peaks, 1.5, 0.06, 0.4,
                                             1.5, 0.06, 0.4, 20, 'gauss', 'bin_ab')
m.bragg_positions_view(wcut, wpeak)

will give an error:

Enter one of the following:
  - peak number (1-5) and scan number (1-3) e.g. 5,3
  - <CR> to continue from present peak and scan (1,1)
  - Q or q to quit
Type option: Error using regexprep
The 'STRING' input must be either a char row vector, a cell array of char row vectors, or a string array.

System details (version, OS)

v0.2.0 on IDAaaS (SL7)

mducle commented 2 years ago

Fix in #24 (change input which doesn't work in Python for the GUI inputdlg)