Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/docs/tutorials/tutorial0_basics.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@
" name='Straight line',\n",
")\n",
"\n",
"binding = edyn.FitBinding(parameter_name='Gaussian area', model=fit_func)\n",
"binding = edyn.FitBinding(model=fit_func, targets='Gaussian area')\n",
"\n",
"parameter_analysis = edyn.ParameterAnalysis(\n",
" parameters=analysis,\n",
Expand Down
6 changes: 3 additions & 3 deletions docs/docs/tutorials/tutorial0_more_advanced.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -339,11 +339,11 @@
" coefficients=[1.1, 0.2], x_unit='1/angstrom', y_unit='meV', name='DHO center fit'\n",
")\n",
"\n",
"binding1 = edyn.FitBinding(parameter_name='Gaussian area', model=gauss_fit_func)\n",
"binding1 = edyn.FitBinding(model=gauss_fit_func, targets='Gaussian area')\n",
"\n",
"binding2 = edyn.FitBinding(parameter_name='DHO area', model=dho_area_fit_func)\n",
"binding2 = edyn.FitBinding(model=dho_area_fit_func, targets='DHO area')\n",
"\n",
"binding3 = edyn.FitBinding(parameter_name='DHO center', model=dho_center_fit_func)\n",
"binding3 = edyn.FitBinding(model=dho_center_fit_func, targets='DHO center')\n",
"\n",
"parameter_analysis = edyn.ParameterAnalysis(\n",
" parameters=analysis,\n",
Expand Down
29 changes: 9 additions & 20 deletions docs/docs/tutorials/tutorial1_brownian.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@
"$$\n",
"where $\\Gamma(Q) = D Q^2$ and $D$ is the diffusion coefficient. $S$ is an overall scale.\n",
"\n",
"To fit the Brownian translational diffusion model to the data, we use the `ParameterAnalysis`. This time, we wish to fit the `Lorentzian`, and we wish to fit both its area (scale, $S$) and width to the diffusion model. We do this by creating a `FitBinding`, saying we want to fit both the area an width of the component called `Lorentzian`"
"To fit the Brownian translational diffusion model to the data, we use the `ParameterAnalysis`. This time, we wish to fit the `Lorentzian`, and we wish to fit both its area (scale, $S$) and width to the diffusion model. We do this by creating a `FitBinding`. Because the diffusion model's `lorentzian_name` matches the fitted component's name, the default targets automatically fit both the area and the width against the `Lorentzian area` and `Lorentzian width` parameters"
]
},
{
Expand All @@ -462,18 +462,17 @@
"outputs": [],
"source": [
"brownian_diffusion_model = sm.BrownianTranslationalDiffusion(\n",
" name='Brownian Translational Diffusion', diffusion_coefficient=2.4e-9, scale=0.5\n",
" name='Brownian Translational Diffusion',\n",
" lorentzian_name='Lorentzian',\n",
" diffusion_coefficient=2.4e-9,\n",
" scale=0.5,\n",
")\n",
"\n",
"binding = edyn.FitBinding(\n",
" parameter_name='Lorentzian',\n",
" model=brownian_diffusion_model,\n",
" modes=['area', 'width'],\n",
")\n",
"binding = edyn.FitBinding(model=brownian_diffusion_model)\n",
"\n",
"parameter_analysis = edyn.ParameterAnalysis(\n",
" parameters=diffusion_analysis,\n",
" bindings=[binding],\n",
" bindings=binding,\n",
")"
]
},
Expand All @@ -495,16 +494,6 @@
"parameter_analysis.plot()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "57b76d06",
"metadata": {},
"outputs": [],
"source": [
"parameter_analysis.plot(names=['Polynomial_c0'])"
]
},
{
"cell_type": "markdown",
"id": "64babb01",
Expand Down Expand Up @@ -691,7 +680,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "default",
"language": "python",
"name": "python3"
},
Expand All @@ -705,7 +694,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.14.5"
"version": "3.14.6"
}
},
"nbformat": 4,
Expand Down
Loading
Loading