Skip to content
Snippets Groups Projects
Commit 554cf0d1 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

..

parent aecd9a09
No related branches found
No related tags found
1 merge request!1742repair Pt_layer example; rm anaklasis directory
...@@ -18,4 +18,8 @@ BornAgain supports ...@@ -18,4 +18,8 @@ BornAgain supports
In the following we will show how to fit using the BornAgain Python API. In the following we will show how to fit using the BornAgain Python API.
For fitting through the graphical user interface, see [GUI > Fitting](/gui/gui-fitting). For fitting through the graphical user interface, see [GUI > Fitting](/gui/gui-fitting).
For most examples,
the environment variable `BA_DATA_DIR` must point
to the copy of directory {{% ref-src "testdata" %}} in your local BornAgain installation.
{{% children depth="2" %}} {{% children depth="2" %}}
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
import bornagain as ba import bornagain as ba
def rosenbrock(params): def rosenbrock(params):
x = params["x"].value x = params["x"].value
y = params["y"].value y = params["y"].value
...@@ -10,7 +9,6 @@ def rosenbrock(params): ...@@ -10,7 +9,6 @@ def rosenbrock(params):
tmp2 = 1 - x tmp2 = 1 - x
return 100*tmp1*tmp1 + tmp2*tmp2 return 100*tmp1*tmp1 + tmp2*tmp2
params = ba.Parameters() params = ba.Parameters()
params.add("x", value=-1.2, min=-5.0, max=5.0, step=0.01) params.add("x", value=-1.2, min=-5.0, max=5.0, step=0.01)
params.add("y", value=1.0, min=-5.0, max=5.0, step=0.01) params.add("y", value=1.0, min=-5.0, max=5.0, step=0.01)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment