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

Copy Params to Format/Save Params to File throws error for Multiplicity models #2369

Closed
smk78 opened this issue Nov 4, 2022 · 5 comments · Fixed by #2647
Closed

Copy Params to Format/Save Params to File throws error for Multiplicity models #2369

smk78 opened this issue Nov 4, 2022 · 5 comments · Fixed by #2647
Assignees
Labels
Defect Bug or undesirable behaviour For Feature Parity Issues to give 5x the same functionality as 4x Multiplicity Issue related to handling of multiplicity
Milestone

Comments

@smk78
Copy link
Contributor

smk78 commented Nov 4, 2022

Describe the bug
Whilst using the Unified_Power_rg model, User JamesD observed that trying to 'Copy params to Format' or 'Save Params to File' throws errors and does not work. The bug is easily to replicate.

15:23:15 - ERROR: Traceback (most recent call last):
  File "sas\qtgui\Perspectives\Fitting\FittingPerspective.py", line 120, in onExcelCopy
  File "sas\qtgui\Perspectives\Fitting\FittingWidget.py", line 3891, in onCopyToClipboard
  File "sas\qtgui\Perspectives\Fitting\FittingUtilities.py", line 806, in formatParametersExcel
IndexError: list index out of range
15:23:26 - ERROR: Traceback (most recent call last):
  File "sas\qtgui\Perspectives\Fitting\FittingPerspective.py", line 214, in onParamSave
  File "sas\qtgui\Perspectives\Fitting\FittingWidget.py", line 3896, in onCopyToClipboard
  File "sas\qtgui\Perspectives\Fitting\FittingUtilities.py", line 806, in formatParametersExcel
IndexError: list index out of range

To Reproduce
Run SasView and load up the Shape Independent > unified_power_Rg model
Compute the model
Attempt to Edit > Copy Params to Format/Save Params to File

Expected behavior
The model parameters should be exported. Though slightly different, this functionality works in 4.2.2

Workaround
Edit > Copy Params does work, but the format is not intended for the same use that Copy Params to Format/Save Params to File are

SasView version
Reproduced in 5.0.5, 5.0.4 & 5.0.3 so appears to be a general bug in 5.x

Operating system (please complete the following information):
x64/W10

@smk78 smk78 added Defect Bug or undesirable behaviour For Feature Parity Issues to give 5x the same functionality as 4x labels Nov 4, 2022
@smk78 smk78 added this to the SasView 5.1.0 milestone Nov 4, 2022
@smk78
Copy link
Contributor Author

smk78 commented Nov 4, 2022

On further testing, the same errors are thrown by the onion model, so it probably affects all multiplicity models.

@krzywon krzywon changed the title Copy Params to Format/Save Params to File throws error for unified_power_Rg model Copy Params to Format/Save Params to File throws error for Multiplicity models Jan 27, 2023
@krzywon
Copy link
Contributor

krzywon commented Jan 27, 2023

After some testing, the error is thrown for most/all multiplicity models. Normal parameters are lists of 7 values of the structure ['name', 'SelectedForFit', 'Value', 'Error', 'Min', 'Max', ()] but the multiplicity values like n of the multi-core-shell models are lists of 3 values: ['n', 'error', 'value']. The excel and latex export methods use indices that the multiplicity parameters don't have, causing the error.

multiplicity_param_difference

@lucas-wilkins
Copy link
Contributor

Explicit data structures would be nice

@lucas-wilkins lucas-wilkins self-assigned this Mar 30, 2023
@smk78 smk78 added the Multiplicity Issue related to handling of multiplicity label Sep 21, 2023
@smk78
Copy link
Contributor Author

smk78 commented Sep 21, 2023

Also see #1106

@butlerpd
Copy link
Member

butlerpd commented May 3, 2024

Should be closed by the merge of #2647. Closing manually

@butlerpd butlerpd closed this as completed May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Defect Bug or undesirable behaviour For Feature Parity Issues to give 5x the same functionality as 4x Multiplicity Issue related to handling of multiplicity
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants