Skip to content

Commit

Permalink
Get fitting optimizer from config, not predefined value (I swear I di…
Browse files Browse the repository at this point in the history
…d this before...)
  • Loading branch information
krzywon committed Oct 11, 2024
1 parent 49ff47e commit 86c689f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/sas/qtgui/Perspectives/Fitting/FittingPerspective.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
from PySide6 import QtWidgets

from bumps import options
from bumps import fitters

from sas.system.config import config

import sas.qtgui.Utilities.ObjectLibrary as ObjectLibrary
import sas.qtgui.Utilities.GuiUtils as GuiUtils
Expand Down Expand Up @@ -50,9 +51,6 @@ def __init__(self, parent=None, data=None):
# Max index for adding new, non-clashing tab names
self.maxIndex = 1

# The default optimizer
self.optimizer = 'Levenberg-Marquardt'

# Dataset index -> Fitting tab mapping
self.dataToFitTab = {}

Expand All @@ -79,7 +77,8 @@ def __init__(self, parent=None, data=None):
# Fit options - uniform for all tabs
self.fit_options = options.FIT_CONFIG
self.fit_options_widget = FittingOptions(config=self.fit_options)
self.fit_options.selected_id = fitters.MPFit.id
self.fit_options.selected_id = config.config.FITTING_DEFAULT_OPTIMIZER
self.optimizer = self.fit_options.selected_name

# Listen to GUI Manager signal updating fit options
self.fit_options_widget.fit_option_changed.connect(self.onFittingOptionsChange)
Expand Down

0 comments on commit 86c689f

Please sign in to comment.