Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add +/- 1 and 3 sigma lines on residual plots #2443

Conversation

butlerpd
Copy link
Member

Description

Residual plots should now have 2 red lines at +/- 3 sigma and 2 dashed gray lines at +/-1 sigma. There does not seem to be any documentation that needs updating.

The only change necessary for this was to use the data1D_plot_role already established. This allows the fix to require only a small 5 line block of code in the PlotterWidget in plotter.py. Basically if data.plot_role==data1D.ROLE_RESIDUAL then add 4 horizontal lines (ax.axhline()).

Fixes #1329

How Has This Been Tested?

by running in developer environment

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.
Load a data set (AOT microemulsion for example), send to fitting, choose a model (e.g. sphere/core_shell_sphere), hit compute/plot and/or fit (after choosing some parameters to fit). The residual plots should have the extra 4 lines.

Review Checklist (please remove items if they don't apply):

  • Code has been reviewed
  • Functionality has been tested
  • Windows installer (GH artifact) has been tested (installed and worked)
  • MacOSX installer (GH artifact) has been tested (installed and worked)
  • The introduced changes comply with SasView license (BSD 3-Clause)

Residual plots should now have 2 red lines at +/- 3 sigma and 2 dashed gray lines at +/-1 sigma.  There does not seem to be any documentation that needs updating.
@butlerpd butlerpd linked an issue Feb 25, 2023 that may be closed by this pull request
@butlerpd butlerpd changed the title Add +/- 1 adn 3 sigma lines on residual plots Add +/- 1 and 3 sigma lines on residual plots Feb 26, 2023
@krzywon
Copy link
Contributor

krzywon commented Feb 27, 2023

This does what it says it does on the surface, but there is a wrinkle. The P(r) plot is tagged as a residual plot so the lines are drawn on those plots as well. Fixing another plot type goes beyond this PR so I would say we document the issue and not let it hold up this change.

@wpotrzebowski wpotrzebowski added the Discuss At The Call Issues to be discussed at the fortnightly call label Feb 28, 2023
@wpotrzebowski
Copy link
Contributor

We agreed to merge it but we need to document issue with PR plot as pointed out by @krzywon

@wpotrzebowski wpotrzebowski merged commit ed77650 into main Feb 28, 2023
@wpotrzebowski wpotrzebowski deleted the 1329-meaningless-error-values-on-theory-and-normalised-residuals branch February 28, 2023 14:24
@krzywon krzywon mentioned this pull request Feb 28, 2023
6 tasks
@butlerpd butlerpd removed the Discuss At The Call Issues to be discussed at the fortnightly call label Aug 1, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Meaningless error values on Theory and Normalised Residuals
3 participants