fixed overwriting result parameter
This commit is contained in:
parent
39374ab17a
commit
67fbeffb6f
2
Makefile
2
Makefile
@ -8,4 +8,4 @@ all:
|
||||
pyuic4 YAFFparameters.ui -o YAFFparameters.py
|
||||
pyuic4 YAFFConfig.ui -o YAFFConfig.py
|
||||
stats:
|
||||
wc -l QDS.py ContainerWidgets.py Container.py libyaff.py mathlib.py data.py
|
||||
wc -l QDS.py ContainerWidgets.py Container.py libyaff.py Mathlib.py Data.py
|
||||
|
13
QDS.py
13
QDS.py
@ -371,9 +371,9 @@ class AppWindow(QMainWindow):
|
||||
self.updatePlot()
|
||||
|
||||
def fitData_start(self, method):
|
||||
print method
|
||||
#fit_methods = [fit_odr_cmplx, fit_odr_imag, fit_lbfgsb, fit_anneal]
|
||||
|
||||
self.fit_boundary_real.hide()
|
||||
self.fit_boundary_imag.hide()
|
||||
fit_method = [
|
||||
self._fit_method.fit_odr_cmplx,
|
||||
self._fit_method.fit_odr_imag,
|
||||
@ -407,11 +407,16 @@ class AppWindow(QMainWindow):
|
||||
|
||||
self.data.set_fit(odr_result.beta, funcs)
|
||||
self.ui.statusbar.showMessage(" ".join(odr_result.stopreason))
|
||||
ndx = 0
|
||||
for i,fcn in enumerate(self.function_registry.get_registered_functions()):
|
||||
num_p = len(fcn.getParameter())
|
||||
beta = odr_result.beta[i:num_p+i]
|
||||
sd_beta = odr_result.sd_beta[i:num_p+i]
|
||||
beta = odr_result.beta[ndx:num_p+ndx]
|
||||
sd_beta = odr_result.sd_beta[ndx:num_p+ndx]
|
||||
fcn.setParameter(beta, sd_beta)
|
||||
ndx += num_p
|
||||
|
||||
self.fit_boundary_real.show()
|
||||
self.fit_boundary_imag.show()
|
||||
|
||||
def getFileNames(self):
|
||||
tmp = QFileDialog.getOpenFileNames(self, "Open file", "", '*.dat *.TXT')
|
||||
|
BIN
icons/qds_fit_abort.png
Normal file
BIN
icons/qds_fit_abort.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
Loading…
Reference in New Issue
Block a user