Skip to content

Conversation

@rozyczko
Copy link
Member

@rozyczko rozyczko commented May 8, 2025

Description

Refactoring of the Fitting widget left some dangling references to old methods, which now reside on separate objects.
This got fixed.

Fixes #3343

How Has This Been Tested?

Local Windows 10 tests

Review Checklist:

[if using the editor, use [x] in place of [ ] to check a box]

Documentation (check at least one)

  • There is nothing that needs documenting
  • Documentation changes are in this PR
  • There is an issue open for the documentation (link?)

Installers

  • There is a chance this will affect the installers, if so
    • Windows installer (GH artifact) has been tested (installed and worked)
    • MacOSX installer (GH artifact) has been tested (installed and worked)

Licencing (untick if necessary)

  • The introduced changes comply with SasView license (BSD 3-Clause)

Copy link
Contributor

@krzywon krzywon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix allows the constrained fit window to launch, but when running a constrained fit, I see an error related to bumps v1. I'll add an issue to fix that, but think this PR is likely good to go.

Error I see, for reference (similar issue fixed in #3165):

ERROR: Fitting failed: Traceback (most recent call last): File "sas\qtgui\Perspectives\Fitting\FitThread.py", line 17, in map_getattr return_value = getattr(classInstance, classFunc)(*args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "sas\sascalc\fit\BumpsFitting.py", line 315, in fit problem.setp_hook() File "sas\sascalc\fit\BumpsFitting.py", line 232, in call self.update() File "M2.background=M3.background M2.scale=M3.scale M2.radius=M3.radius M1.radius=M2.radius M1.background=M2.background M1.scale=M2.scale", line 11, in eval_expressions File "bumps\parameter.py", line 451, in value return int(self.slot) if self.discrete else float(self.slot) ^^^^^^^^^^^^^^^^ File "uncertainties\core.py", line 2611, in raise_error raise TypeError("can't convert an affine function (%s)" TypeError: can't convert an affine function () to float; use x.nominal_value

@krzywon krzywon merged commit 541833c into release-6.1.0 May 9, 2025
34 checks passed
@krzywon krzywon deleted the 3343-constrained-or-simultaneous-fit-doesnt-work branch May 9, 2025 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants