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
6 changes: 3 additions & 3 deletions docs/docs/tutorials/analysis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "default",
"language": "python",
"name": "python3"
},
Expand All @@ -352,9 +352,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.14.4"
"version": "3.14.5"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
}
4 changes: 2 additions & 2 deletions docs/docs/tutorials/analysis1d.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "default",
"language": "python",
"name": "python3"
},
Expand All @@ -100,4 +100,4 @@
},
"nbformat": 4,
"nbformat_minor": 5
}
}
6 changes: 3 additions & 3 deletions docs/docs/tutorials/component_collection.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "default",
"language": "python",
"name": "python3"
},
Expand All @@ -81,9 +81,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.14.4"
"version": "3.14.5"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
}
4 changes: 2 additions & 2 deletions docs/docs/tutorials/components.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "default",
"language": "python",
"name": "python3"
},
Expand All @@ -191,4 +191,4 @@
},
"nbformat": 4,
"nbformat_minor": 5
}
}
6 changes: 3 additions & 3 deletions docs/docs/tutorials/convolution.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "default",
"language": "python",
"name": "python3"
},
Expand All @@ -224,9 +224,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.14.4"
"version": "3.14.5"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
}
Binary file modified docs/docs/tutorials/data/fake_advanced_data.hdf5
Binary file not shown.
Binary file modified docs/docs/tutorials/data/fake_simple_data.hdf5
Binary file not shown.
6 changes: 3 additions & 3 deletions docs/docs/tutorials/delta_lorentz.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "default",
"language": "python",
"name": "python3"
},
Expand All @@ -110,9 +110,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.14.4"
"version": "3.14.5"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
}
4 changes: 2 additions & 2 deletions docs/docs/tutorials/detailed_balance.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "easydynamics_newbase",
"display_name": "default",
"language": "python",
"name": "python3"
},
Expand All @@ -100,7 +100,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.12"
"version": "3.14.5"
}
},
"nbformat": 4,
Expand Down
6 changes: 3 additions & 3 deletions docs/docs/tutorials/diffusion_model.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "default",
"language": "python",
"name": "python3"
},
Expand All @@ -99,9 +99,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.14.4"
"version": "3.14.5"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
}
4 changes: 2 additions & 2 deletions docs/docs/tutorials/experiment.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.12"
"version": "3.14.5"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
}
4 changes: 2 additions & 2 deletions docs/docs/tutorials/instrument_model.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.12"
"version": "3.14.5"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
}
6 changes: 3 additions & 3 deletions docs/docs/tutorials/sample_model.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
" diffusion_models=diffusion_model,\n",
" components=component_collection,\n",
" Q=Q,\n",
" unit='meV',\n",
" x_unit='meV',\n",
" display_name='MySampleModel',\n",
" temperature=10,\n",
")\n",
Expand Down Expand Up @@ -127,7 +127,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "default",
"language": "python",
"name": "python3"
},
Expand All @@ -146,4 +146,4 @@
},
"nbformat": 4,
"nbformat_minor": 5
}
}
23 changes: 5 additions & 18 deletions docs/docs/tutorials/tutorial0_basics.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -385,28 +385,15 @@
"cell_type": "markdown",
"id": "842c1f01",
"metadata": {},
"source": [
"The final step in this tutorial is to fit the are of the `Gaussian` to a straight line. For this, we use the `ParameterAnalysis` class. We create a `Polynomial` with two coefficients for the fit function. We create a `FitBinding`, telling the class we want to fit the parameter named `Gaussian area` with the fit function that we define."
]
"source": "The final step in this tutorial is to fit the area of the `Gaussian` as a function of Q using a straight line. For this, we use the `ParameterAnalysis` class.\n\nWe create a `Polynomial` with two coefficients as the fit function. We then create a `FitBinding` to connect the parameter named `Gaussian area` to the fit function, and pass both to a `ParameterAnalysis` object:\n\n<details>\n <summary><strong>Note</strong></summary>\n<div style=\"border-left: 4px solid #2196F3; background:#e3f2fd; padding:10px;\">\nTwo units must be set on the fit function:\n\n- `x_unit='1/angstrom'` — because `ParameterAnalysis` always uses Q as its x-axis.\n- `y_unit='meV'` — because we are fitting `Gaussian area`, which has unit `meV`.\n</div>\n</details>"
},
{
"cell_type": "code",
"execution_count": null,
"id": "75db3d4c",
"metadata": {},
"outputs": [],
"source": [
"fit_func = sm.Polynomial(\n",
" coefficients=[3.7, -0.5], name='Straight line', display_name='Straight line'\n",
")\n",
"\n",
"binding = edyn.FitBinding(parameter_name='Gaussian area', model=fit_func)\n",
"\n",
"parameter_analysis = edyn.ParameterAnalysis(\n",
" parameters=analysis,\n",
" bindings=[binding],\n",
")"
]
"source": "fit_func = sm.Polynomial(\n coefficients=[3.7, -0.5],\n x_unit='1/angstrom',\n y_unit='meV',\n name='Straight line',\n)\n\nbinding = edyn.FitBinding(parameter_name='Gaussian area', model=fit_func)\n\nparameter_analysis = edyn.ParameterAnalysis(\n parameters=analysis,\n bindings=[binding],\n)"
},
{
"cell_type": "markdown",
Expand Down Expand Up @@ -450,7 +437,7 @@
"id": "dc33728c",
"metadata": {},
"source": [
"To see the parameters we can use the `get_all_parameters()` method. We can also see only the parameters that can be fitted:"
"To see the parameters we can use the `get_all_parameters()` method. We can also see only the parameters that can be fitted using `get_fittable_parameters`:"
]
},
{
Expand All @@ -476,7 +463,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "default",
"language": "python",
"name": "python3"
},
Expand All @@ -495,4 +482,4 @@
},
"nbformat": 4,
"nbformat_minor": 5
}
}
20 changes: 11 additions & 9 deletions docs/docs/tutorials/tutorial0_more_advanced.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,7 @@
"cell_type": "markdown",
"id": "0eadbd91",
"metadata": {},
"source": [
"With apologies for the lack of creativity, these all appear like straight lines. We can fit them individually or all together using `ParameterAnalysis`"
]
"source": "With apologies for the lack of creativity, these all appear like straight lines. We can fit them individually or all together using `ParameterAnalysis`.\n\nFor each parameter we want to fit, we create a fit function (here a `Polynomial`) and a `FitBinding` connecting the parameter name to the fit function. We then pass all bindings to a single `ParameterAnalysis` object:\n\n<details>\n <summary><strong>Note</strong></summary>\n<div style=\"border-left: 4px solid #2196F3; background:#e3f2fd; padding:10px;\">\nTwo units must be set on each fit function:\n\n- `x_unit='1/angstrom'` — because `ParameterAnalysis` always uses Q as its x-axis.\n- `y_unit='meV'` — because all three parameters (`Gaussian area`, `DHO area`, `DHO center`) have unit `meV`.\n</div>\n</details>"
},
{
"cell_type": "code",
Expand All @@ -310,10 +308,14 @@
"metadata": {},
"outputs": [],
"source": [
"gauss_fit_func = sm.Polynomial(coefficients=[3.7, -0.5], unit='1/angstrom', name='Gauss area fit')\n",
"dho_area_fit_func = sm.Polynomial(coefficients=[2.0, 0.12], unit='1/angstrom', name='DHO area fit')\n",
"gauss_fit_func = sm.Polynomial(\n",
" coefficients=[3.7, -0.5], x_unit='1/angstrom', y_unit='meV', name='Gauss area fit'\n",
")\n",
"dho_area_fit_func = sm.Polynomial(\n",
" coefficients=[2.0, 0.12], x_unit='1/angstrom', y_unit='meV', name='DHO area fit'\n",
")\n",
"dho_center_fit_func = sm.Polynomial(\n",
" coefficients=[1.1, 0.2], unit='1/angstrom', name='DHO center fit'\n",
" 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",
Expand All @@ -335,7 +337,7 @@
"id": "32bc1efc",
"metadata": {},
"source": [
"The start guesses look reasonable, so we fit:"
"The start guesses look reasonable, so we fit and plot the result:"
]
},
{
Expand All @@ -352,7 +354,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "default",
"language": "python",
"name": "python3"
},
Expand All @@ -371,4 +373,4 @@
},
"nbformat": 4,
"nbformat_minor": 5
}
}
2 changes: 1 addition & 1 deletion docs/docs/tutorials/tutorial1_brownian.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "default",
"language": "python",
"name": "python3"
},
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/tutorials/tutorial2_nanoparticles.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "default",
"language": "python",
"name": "python3"
},
Expand Down
Loading
Loading