SasView / sasview

Code for the SasView application.
BSD 3-Clause "New" or "Revised" License
51 stars 41 forks source link

Plotting a dataset with negative errors is not allowed #3010

Open juliuskarliczek opened 2 months ago

juliuskarliczek commented 2 months ago

Describe the bug I am not sure, whether this problem was addressed in the document from Paul yesterday and i did not see an open issue with this. Feel free to link, if one exists.

When loading one of the example datasets from src/sas/example_data/coordinate_data/sphere_R=0_2025.vtk, quick plotting this dataset throws an error, because it dataset contains negative values in the errors (This is a bug, that was also reported to me by a beta test user here at ILL yesterday ) To Reproduce Steps to reproduce the behavior:

  1. Start sasview
  2. Load data sphere_R=0_2025.vtk into the data explorer
  3. Use quick plotting option "create new" on the bottom of the data explorer
  4. See error

Screenshots image

SasView version (please complete the following information):

Operating system (please complete the following information):

krzywon commented 2 months ago

The error thrown is from matplotlib. I would argue this is expected behavior. Negative errors have no physical meaning and are unplottable.

As a side note, the data file loaded in your example is not SAS data. It is multi-column x,y,z coordinate data, not I vs Q data. The ASCII reader can and will read any multi-column data file, but that doesn't mean the data is valid and analyzable. Coordinate data are meant to be opened by the generic scattering calculator, not via the data explorer.

juliuskarliczek commented 2 months ago

Thanks for clearing that up, i did not know that. The user mentioned, that this error did not occur in 5.0.6