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

Orientation Viewer doesn't work from nigthly build (on Mac) #2577

Closed
wpotrzebowski opened this issue Aug 4, 2023 · 9 comments · Fixed by #2600
Closed

Orientation Viewer doesn't work from nigthly build (on Mac) #2577

wpotrzebowski opened this issue Aug 4, 2023 · 9 comments · Fixed by #2600
Assignees

Comments

@wpotrzebowski
Copy link
Contributor

Describe the bug
Discovered while testing Mac installer but it may also occur on other platforms
Gives an error when trying to run:
07:41:09 - ERROR: Traceback (most recent call last):
File "sas/qtgui/MainWindow/GuiManager.py", line 1029, in actionOrientation_Viewer
File "sas/qtgui/Utilities/OrientationViewer/OrientationViewer.py", line 293, in show_orientation_viewer
File "sas/qtgui/Utilities/OrientationViewer/OrientationViewer.py", line 159, in init
File "sas/qtgui/Utilities/OrientationViewer/OrientationViewer.py", line 210, in on_angle_changed
File "sas/qtgui/Utilities/OrientationViewer/OrientationViewer.py", line 173, in _set_image_data
File "sas/qtgui/Utilities/OrientationViewer/OrientationViewer.py", line 261, in scatering_data
File "sasmodels/direct_model.py", line 375, in call
return self._calc_theory(pars, cutoff=self.cutoff)
File "sasmodels/direct_model.py", line 340, in _calc_theory
Iq_calc = call_kernel(self._kernel, pars, cutoff=cutoff)
File "sasmodels/direct_model.py", line 59, in call_kernel
mesh = get_mesh(calculator.info, pars, dim=calculator.dim, mono=mono)
File "sasmodels/direct_model.py", line 125, in get_mesh
raise TypeError(f"Unused parameters in call: {', '.join(values.keys())}")
TypeError: Unused parameters in call: a, b, c

To Reproduce
Steps to reproduce the behavior:

  1. Download nightly build
  2. Try to run "Orientation Viewer"

SasView version (please complete the following information):

  • Version: nightly build

Operating system (please complete the following information):

  • OS: Mac OSX
@lucas-wilkins
Copy link
Contributor

hmmmm, OK, I'll check it on windows.

We still don't have a mac, but hopefully its just another bug associated with PySide

@lucas-wilkins
Copy link
Contributor

although, it might be something to do with a change in the paracrystal model, if that has happened

@lucas-wilkins
Copy link
Contributor

Yeah, it's caused by a change in sasmodels.

@lucas-wilkins
Copy link
Contributor

This is the cause: SasView/sasmodels#563

It breaks things pretty hard. Not just an issue with parameter names.

@pkienzle
Copy link
Contributor

pkienzle commented Aug 8, 2023

The orientation viewer is using incorrect parameter names for parallelepiped. The new sasmodels kernel call correctly reports this.

The fix should be trivial: change orientation viewer calculator to use length_a, length_b, and length_c. There is also a typo in background in the original jitter.py code.

@pkienzle
Copy link
Contributor

pkienzle commented Aug 8, 2023

After fixing and merging the corrections to the orientation viewer the sasmodels PR SasView/sasmodels#575 can be merged.

@wpotrzebowski
Copy link
Contributor Author

wpotrzebowski commented Aug 16, 2023

Orientation viewer doesn't work again (tested in nightly build)


07:40:52 - INFO:  --- SasView session started, version 6.0.0a1, 2023 ---
07:40:52 - INFO: Python: 3.8.17 (default, Jun  7 2023, 12:31:35) 
[Clang 13.0.0 (clang-1300.0.29.30)]
07:40:57 - ERROR: Traceback (most recent call last):
  File "sas/qtgui/MainWindow/GuiManager.py", line 1032, in actionOrientation_Viewer
  File "sas/qtgui/Utilities/OrientationViewer/OrientationViewer.py", line 293, in show_orientation_viewer
  File "sas/qtgui/Utilities/OrientationViewer/OrientationViewer.py", line 159, in __init__
  File "sas/qtgui/Utilities/OrientationViewer/OrientationViewer.py", line 210, in on_angle_changed
  File "sas/qtgui/Utilities/OrientationViewer/OrientationViewer.py", line 173, in _set_image_data
  File "sas/qtgui/Utilities/OrientationViewer/OrientationViewer.py", line 261, in scatering_data
  File "sasmodels/direct_model.py", line 377, in __call__
    return self._calc_theory(pars, cutoff=self.cutoff)
  File "sasmodels/direct_model.py", line 342, in _calc_theory
    Iq_calc = call_kernel(self._kernel, pars, cutoff=cutoff)
  File "sasmodels/direct_model.py", line 59, in call_kernel
    mesh = get_mesh(calculator.info, pars, dim=calculator.dim, mono=mono)
  File "sasmodels/direct_model.py", line 126, in get_mesh
    raise TypeError(f"Unused parameters in call: {', '.join(values.keys())}")
TypeError: Unused parameters in call: a, b, c

@wpotrzebowski wpotrzebowski reopened this Aug 16, 2023
@lucas-wilkins
Copy link
Contributor

Weird, I though I'd tested the change. I might have tested it with the parameter names changed. Will try it from the linked branch in a bit.

@lucas-wilkins
Copy link
Contributor

Yeah, it's broken again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants