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

Error thrown by inversion perspective #3064

Closed
butlerpd opened this issue Aug 18, 2024 · 1 comment
Closed

Error thrown by inversion perspective #3064

butlerpd opened this issue Aug 18, 2024 · 1 comment
Labels
Major Big change in the code or important change in behaviour SasView 6.0.0 Required for 6.0.0 release

Comments

@butlerpd
Copy link
Member

Describe the bug
When switching to the Inversion perspective for the very first time, the Calculate, Explore and Remove buttons remain grayed out as they should be since no data is available. Further the Parameters are loaded with the defaults while the two suggestion buttons for Number of terms and Reg constant are also grayed out and empty, again as expected given the lack of data.

Once data is sent to the perspective, all buttons become active and the suggested value button updated with the suggested values (eventually -see #3060).

However, when a data set is removed, all the buttons remain active (none are grayed out) though the values of the parameters are reset to the default and the suggested value buttons now have the same default value rather than being blank. If the user then clicks on either the active Calculate button or the Explore button, an error is thrown.

If the Calculate button is pressed the following error is thrown

03:14:28 - ERROR: Traceback (most recent call last): File "sas\qtgui\Perspectives\Inversion\InversionPerspective.py", line 817, in startThread
File "sas\qtgui\Perspectives\Inversion\InversionPerspective.py", line 377, in updateCalculator AttributeError: 'NoneType' object has no attribute 'x'

If the Explore button is pressed the following error is thrown.

04:06:35 - ERROR: ExploreDialog: inversion failed for D_max=126.0 division by zero
04:06:35 - ERROR: ExploreDialog: inversion failed for D_max=129.11111111111111 division by zero
04:06:35 - ERROR: ExploreDialog: inversion failed for D_max=132.22222222222223 division by zero
04:06:35 - ERROR: ExploreDialog: inversion failed for D_max=135.33333333333334 division by zero
04:06:35 - ERROR: ExploreDialog: inversion failed for D_max=138.44444444444446 division by zero
04:06:35 - ERROR: ExploreDialog: inversion failed for D_max=141.55555555555554 division by zero
04:06:35 - ERROR: ExploreDialog: inversion failed for D_max=144.66666666666666 division by zero
04:06:35 - ERROR: ExploreDialog: inversion failed for D_max=147.77777777777777 division by zero
04:06:35 - ERROR: ExploreDialog: inversion failed for D_max=150.88888888888889 division by zero
04:06:35 - ERROR: ExploreDialog: inversion failed for D_max=154.0 division by zero

To Reproduce
Steps to reproduce the behavior:

  1. Switch to the inversion perspective
  2. All buttons are grayed out
  3. Now load some data (e.g. apoferritin)
  4. Send to Inversion (P(r))
  5. Once the Calculate button becomes active click the Remove button
  6. Note all buttons remain active

Expected behavior
The 5.0.6 behavior should be restored. Basically, the buttons should return to the status/values that existed prior to loading any data. The only difference could be that the suggested value buttons contain the default values. They should however remain grayed out and not active.

SasView version (please complete the following information):

  • Version: 6.0.0b2 (works in 5.0.6)

Operating system (please complete the following information):

  • OS: Windows 10

Additional context
Identified while tracking and verifying bugs reported from the NIST CNR summer school

@butlerpd butlerpd added Major Big change in the code or important change in behaviour SasView 6.0.0 Required for 6.0.0 release labels Aug 18, 2024
@krzywon
Copy link
Contributor

krzywon commented Aug 20, 2024

This was fixed in #2985 after the release of beta2

@krzywon krzywon closed this as completed Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Major Big change in the code or important change in behaviour SasView 6.0.0 Required for 6.0.0 release
Projects
None yet
Development

No branches or pull requests

2 participants