fixed overwriting result parameter

This commit is contained in:
Markus Rosenstihl 2014-04-15 22:00:36 +02:00
parent 39374ab17a
commit 67fbeffb6f
4 changed files with 11 additions and 5 deletions

View File

@ -2,3 +2,4 @@ syntax: glob
*.pyc
.idea
.DS_Store
fitresults.log

View File

@ -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
View File

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB