Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
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
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,27 @@

---

## v0.16.0

---

- Add [Cumulative Distribution Function][38] to the `SpectraFit` package
- Refactor the `model.py` of `SpectraFit` package

## v0.15.1

---

- Maintenance of the `SpectraFit` package

## v0.15.0

---

- Add `plugins` to the `SpectraFit` package for working with [RIXS][36] data
- `pikle`-file converter and visualizer for [RIXS][36] data
- Simplify the `SpectraFit` continous deployment by using [build][37]

## v0.14.0

---
Expand Down Expand Up @@ -343,3 +364,6 @@
[33]: https://github.com/conda-forge/spectrafit-feedstock
[34]: https://fishshell.com
[35]: https://githubnext.com/projects/copilot-labs/
[36]: https://en.wikipedia.org/wiki/Resonant_inelastic_X-ray_scattering
[37]: https://github.com/pypa/build
[38]: https://en.wikipedia.org/wiki/Cumulative_distribution_function
26 changes: 17 additions & 9 deletions docs/doc/models.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,23 +67,31 @@

Here is a list of implemented models of `spectrafit`:

::: spectrafit.models.gaussian
::: spectrafit.models.DistributionModels.gaussian

::: spectrafit.models.lorentzian
::: spectrafit.models.DistributionModels.lorentzian

::: spectrafit.models.pseudovoigt
::: spectrafit.models.DistributionModels.pseudovoigt

::: spectrafit.models.voigt
::: spectrafit.models.DistributionModels.voigt

::: spectrafit.models.exponential
::: spectrafit.models.DistributionModels.exponential

::: spectrafit.models.power
::: spectrafit.models.DistributionModels.power

::: spectrafit.models.linear
::: spectrafit.models.DistributionModels.linear

::: spectrafit.models.constant
::: spectrafit.models.DistributionModels.constant

::: spectrafit.models.step
::: spectrafit.models.DistributionModels.erf

::: spectrafit.models.DistributionModels.heaviside

::: spectrafit.models.DistributionModels.atan

::: spectrafit.models.DistributionModels.log

::: spectrafit.models.DistributionModels.c_gaussian

## Important constans for the models

Expand Down
30,319 changes: 28 additions & 30,291 deletions docs/examples/example9_1.ipynb

Large diffs are not rendered by default.

13,283 changes: 14 additions & 13,269 deletions docs/examples/example9_2.ipynb

Large diffs are not rendered by default.

40 changes: 8 additions & 32 deletions docs/examples/example9_3.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -37,7 +37,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -53,20 +53,9 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"## Warning: uncertainties could not be estimated:\n",
"'MinimizerResult' object has no attribute 'covar': Covariance Matrix could not be calculated.\n",
"\n",
"Error: Cannot determine Confidence Intervals without sensible uncertainty estimates -> No confidence interval could be calculated!\n"
]
}
],
"outputs": [],
"source": [
"initial_model = [\n",
" {\n",
Expand Down Expand Up @@ -127,7 +116,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -138,22 +127,9 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[PosixPath('fit_example9_3.csv'),\n",
" PosixPath('act_example9_3.csv'),\n",
" PosixPath('org_example9_3.csv')]"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"from pathlib import Path\n",
"\n",
Expand Down Expand Up @@ -184,7 +160,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.9 (main, Dec 21 2022, 15:55:14) [Clang 14.0.0 (clang-1400.0.29.202)]"
"version": "3.10.9"
},
"orig_nbformat": 4,
"vscode": {
Expand Down
35 changes: 7 additions & 28 deletions docs/examples/example9_4.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -36,7 +36,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -54,7 +54,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -71,40 +71,19 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
" <iframe\n",
" width=\"100%\"\n",
" height=\"650\"\n",
" src=\"http://127.0.0.1:8050/\"\n",
" frameborder=\"0\"\n",
" allowfullscreen\n",
" \n",
" ></iframe>\n",
" "
],
"text/plain": [
"<IPython.lib.display.IFrame at 0x2a0381390>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"outputs": [],
"source": [
"_app.app_run()"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"![_](https://github.com/Anselmoo/spectrafit/raw/main/docs/examples/images/Figure_9_4.png)"
"![_](https://github.com/Anselmoo/spectrafit/blob/9f46aac202a6edfe8d063ecd46fadd3c14a6e28d/docs/examples/images/Figure_9_4.png?raw=true)"
]
}
],
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/example9_5.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.9 (main, Dec 21 2022, 15:55:14) [Clang 14.0.0 (clang-1400.0.29.202)]"
"version": "3.10.9"
},
"orig_nbformat": 4,
"vscode": {
Expand Down
32 changes: 16 additions & 16 deletions docs/examples/example9_6.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -20,7 +20,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -43,7 +43,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -64,17 +64,9 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"## Warning: uncertainties could not be estimated:\n"
]
}
],
"outputs": [],
"source": [
"initial_model = [\n",
" {\n",
Expand Down Expand Up @@ -121,7 +113,7 @@
" }\n",
" },\n",
"]\n",
"spn.solver_model(initial_model=initial_model, show_plot=False, show_metric=False)"
"spn.solver_model(initial_model=initial_model, show_plot=True, show_metric=False)"
]
},
{
Expand All @@ -131,8 +123,16 @@
"source": [
"#### Note:\n",
"\n",
"Currently, the global fitting routine has no plot function. However, the\n",
"metric function can be used to plot the fit errors."
"Currently, the global fitting routine provides each spectrum as its own.\n",
"This also allows to use other color schemes."
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"![](https://github.com/Anselmoo/spectrafit/raw/main/docs/examples/images/Figure_9_6.png)"
]
}
],
Expand Down
Binary file added docs/examples/images/Figure_9_6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions mkdocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ nav:
- Export Results: examples/example9_3.ipynb
- RIXS Map Visualization: examples/example9_4.ipynb
- Using Converters as Module: examples/example9_5.ipynb
- RIXS Global-Fitting in Jupyter: examples/example9_6.ipynb
- Documentation:
- Models: doc/models.md
- Expression: doc/expression.md
Expand Down
Loading