print("rec.A =", rec.A) print("rec.A.value =", rec.A.value) # The names of the declared variables are stored in a rec.names # and the corresponding values in rec.values. print("rec.values =", rec.values) print("rec.names =", rec.names) # Finally the recipe objects provides a residual() function to calculate # the difference between the observed and simulated values. The residual # function can accept a list of new variable values in the same order as # rec.names. print("rec.residual() =", rec.residual()) print("rec.residual([2, 4]) =", rec.residual([2, 4])) # <demo> --- stop --- # The FitRecipe.residual function can be directly used with the scipy # leastsq function for minimizing a sum of squares. from scipy.optimize import leastsq leastsq(rec.residual, rec.values) # Recipe variables and the linked line-function parameters are set to the # new optimized values. print(rec.names, "-->", rec.values) linefit.show()
# print("recipe.A =", recipe.A) # print("recipe.A.value =", recipe.A.value) # The names of the declared variables are stored in a rec.names # and the corresponding values in rec.values. # print("recipe.values =", recipe.values) # print("recipe.names =", recipe.names) # Finally the recipe objects provides a residual() function to calculate # the difference between the observed and simulated values. The residual # function can accept a list of new variable values in the same order as # rec.names. print("recipe.residual() =", recipe.residual()) print("recipe.residual([290000, 51, 29, 500, 71, 3]) =", recipe.residual([290000, 51, 29, 500, 68, 3])) # <demo> --- stop --- # The FitRecipe.residual function can be directly used with the scipy # leastsq function for minimizing a sum of squares. from scipy.optimize import leastsq leastsq(recipe.residual, recipe.values) # Recipe variables and the linked line-function parameters are set to the # new optimized values. print(recipe.names, "-->", recipe.values)
print("rec.A =", rec.A) print("rec.A.value =", rec.A.value) # The names of the declared variables are stored in a rec.names # and the corresponding values in rec.values. print("rec.values =", rec.values) print("rec.names =", rec.names) # Finally the recipe objects provides a residual() function to calculate # the difference between the observed and simulated values. The residual # function can accept a list of new variable values in the same order as # rec.names. print("rec.residual() =", rec.residual()) print("rec.residual([2, 4]) =", rec.residual([2, 4])) # <demo> --- stop --- # The FitRecipe.residual function can be directly used with the scipy # leastsq function for minimizing a sum of squares. from scipy.optimize import leastsq leastsq(rec.residual, rec.values) # Recipe variables and the linked line-function parameters are set to the # new optimized values. print(rec.names, "-->", rec.values) linefit.show()
print("recipe.A =", recipe.A) print("recipe.A.value =", recipe.A.value) # The names of the declared variables are stored in a rec.names # and the corresponding values in rec.values. print("recipe.values =", recipe.values) print("recipe.names =", recipe.names) # Finally the recipe objects provides a residual() function to calculate # the difference between the observed and simulated values. The residual # function can accept a list of new variable values in the same order as # rec.names. print("recipe.residual() =", recipe.residual()) print("recipe.residual([290000, 51, 29]) =", recipe.residual([290000, 51, 29])) # <demo> --- stop --- # The FitRecipe.residual function can be directly used with the scipy # leastsq function for minimizing a sum of squares. from scipy.optimize import leastsq leastsq(recipe.residual, recipe.values) # Recipe variables and the linked line-function parameters are set to the # new optimized values. print(recipe.names, "-->", recipe.values) large_gaussian.show()