SasView / sasview

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

Don't show SLD Profile button for models without a profile #1897

Closed smk78 closed 5 months ago

smk78 commented 3 years ago

Using Release 5.0.4, clicking the Show SLD Profile button in the unified_power_rg model returns

ERROR: SLD profile calculation failed.

It works in the onion model...

rozyczko commented 3 years ago

model_info.profile attribute for this model is None, whereas it should be a method to calculate the profile. This likely is a Sasmodels issue.

smk78 commented 3 years ago

Replaced by https://github.com/SasView/sasmodels/issues/475

pkienzle commented 2 years ago

The program is correctly not showing the profile because it is not a shape-based model.

I'm changing the title to reflect that the profile button should be disabled or hidden in sasview for models that do not have an associated profile.

butlerpd commented 2 years ago

I think this is related to the RPA issue https://github.com/SasView/sasmodels/issues/396 (SLD also fails for RPA of course) in that it is misusing the "control" parameter. SLD seems to be attached to each model with a control parameter (and shown on the control parameter linked in the GUI interface). In other words all "multiplicity" models and only "multiplicity" models get the button.

We should decouple the show SLD from any parameter on the interface and provide that button only when a query to the model returns that an SLD function is available (hasSLD = True for example). Further that button should not be part of the parameter table IMO

At any rate this clearly cannot be done for 5.0.5 so moving it to 5.1

rozyczko commented 2 years ago

Not having the Show SLD button part of the table would simplify quite a lot of logic inside the table. I am for it.

butlerpd commented 5 months ago

This should have closed with the merge of #2647. Doing it manually