Skip to content
Snippets Groups Projects
Commit 7a2fa812 authored by simply-nicky's avatar simply-nicky
Browse files

Squashed commit of the following:

commit 2a9ec26a
Author: simply-nicky <simply.i.nicky@gmail.com>
Date:   Tue Jun 8 10:10:53 2021 +0200

    tqdm added to README

commit ca929562
Author: simply-nicky <simply.i.nicky@gmail.com>
Date:   Tue Jun 8 10:00:24 2021 +0200

    Sigray tutorial fixed

commit 001b4282
Author: simply-nicky <simply.i.nicky@gmail.com>
Date:   Mon Jun 7 17:38:12 2021 +0200

    small update to the documentation

commit 87819753
Merge: 6a548593 0090f103
Author: simply-nicky <simply.i.nicky@gmail.com>
Date:   Mon Jun 7 16:46:28 2021 +0200

    Merge branch 'master' of https://github.com/simply-nicky/pyrost

commit 6a548593
Author: simply-nicky <simply.i.nicky@gmail.com>
Date:   Mon Jun 7 16:46:25 2021 +0200

    bug fix

commit 0090f103
Merge: 03cc9ba7 123c5e93
Author: simply-nicky <simply.i.nicky@gmail.com>
Date:   Mon Jun 7 16:40:08 2021 +0200

    Merge branch 'dev-maxwell'

commit 03cc9ba7
Merge: 2e47d6f0 1af287e9
Author: simply-nicky <simply.i.nicky@gmail.com>
Date:   Mon Jun 7 16:34:08 2021 +0200

    Merge branch 'dev-maxwell'

commit 2e47d6f0
Merge: c1484b15 ed47a2ea
Author: simply-nicky <simply.i.nicky@gmail.com>
Date:   Mon Jun 7 16:23:46 2021 +0200

    Merge branch 'dev-maxwell'

commit c1484b15
Merge: 0db2ceac 239ca147
Author: simply-nicky <simply.i.nicky@gmail.com>
Date:   Mon Jun 7 15:53:39 2021 +0200

    Merge branch 'dev-maxwell'

commit 0db2ceac
Merge: e34d256e 64148ea1
Author: simply-nicky <simply.i.nicky@gmail.com>
Date:   Tue Mar 2 17:27:04 2021 +0100

    Merge branch 'dev0'

commit e34d256e
Merge: 6116e717 6e6560c3
Author: simply-nicky <simply.i.nicky@gmail.com>
Date:   Tue Mar 2 13:42:15 2021 +0100

    Merge branch 'dev0'

commit 6116e717
Merge: e7b638d6 44feb1a5
Author: simply-nicky <simply.i.nicky@gmail.com>
Date:   Tue Mar 2 12:51:35 2021 +0100

    Merge branch 'dev0'

commit e7b638d6
Merge: a891880b 0b03d662
Author: simply-nicky <simply.i.nicky@gmail.com>
Date:   Fri Feb 19 15:16:29 2021 +0100

    Merge branch 'dev0'

commit a891880b
Merge: bace186f b1864199
Author: simply-nicky <simply.i.nicky@gmail.com>
Date:   Wed Feb 17 16:19:21 2021 +0100

    Merge branch 'dev0'

commit bace186f
Merge: 89c2a5eb c985343f
Author: simply-nicky <simply.i.nicky@gmail.com>
Date:   Thu Feb 11 12:33:21 2021 +0100

    Merge branch 'dev0'

commit 89c2a5eb
Merge: fb9fb0ef 6bc19813
Author: simply-nicky <simply.i.nicky@gmail.com>
Date:   Fri Jan 22 17:59:53 2021 +0100

    Merge branch 'dev0'

commit fb9fb0ef
Merge: f19b9d01 e9666264
Author: simply-nicky <simply.i.nicky@gmail.com>
Date:   Fri Jan 22 17:40:55 2021 +0100

    Merge branch 'dev0'

commit f19b9d01
Author: simply-nicky <simply.i.nicky@gmail.com>
Date:   Wed Dec 9 16:28:51 2020 +0100

    Merged with dev0
parent 123c5e93
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,7 @@ graft pyrost/config
graft pyrost/bin
graft pyrost/ini_templates
graft pyrost/data
graft pyrost/include
exclude dev.pyx
include pytest.ini
include LICENSE
......
......@@ -21,6 +21,7 @@ The documentation can be found on [Read the Docs](https://robust-speckle-trackin
- [h5py](https://www.h5py.org) 2.10.0 or later.
- [NumPy](https://numpy.org) 1.19.0 or later.
- [SciPy](https://scipy.org) 1.5.2 or later.
- [tqdm](https://github.com/tqdm/tqdm) 4.56.0 or later.
## Installation
We recommend **not** building from source, but install the release via the
......
......@@ -81,9 +81,9 @@ Let's update the data container with the defocus distance we got.
Speckle Tracking update
-----------------------
Now we’re ready to generate a pyrost.SpeckleTracking object, which is able to perform the
speckle tracking procedure with :func:`SpeckleTracking.iter_update_gd` method. For more
information about the parameters see the section :ref:`diatom-st-update` in the Diatom
dataset tutorial.
speckle tracking procedure with :func:`pyrost.SpeckleTracking.iter_update_gd` method.
For more information about the parameters see the section :ref:`diatom-st-update` in the
Diatom dataset tutorial.
.. doctest::
......@@ -121,21 +121,24 @@ in pixels to center the scattering angles aroung the direction of the direct bea
Moreover we would like to remove the first order polynomial term from the displacement
profile with the :func:`pyrost.AberrationsFit.remove_linear_term`, since it
characterizes the beam's defocus and is of no interest to us:
characterizes the beam's defocus and is of no interest to us. After that, you
can obtain the best fit to the displacement profile with :func:`pyrost.AberrationsFit.fit`
and to the phase profile with :func:`pyrost.AberrationsFit.fit_phase`:
.. doctest::
>>> fit_obj = fit_obj.remove_linear_term()
>>> fit = fit_obj.fit(max_order=3)
>>> fig, axes = plt.subplots(1, 2, figsize=(12, 4)) # doctest: +SKIP
>>> axes[0].plot(fit_obj.thetas, fit_obj.theta_aberrations * 1e9, 'b') # doctest: +SKIP
>>> axes[0].plot(fit_obj.thetas, fit_obj.model(fcf_rst['fit']) * fit_obj.ref_ap * 1e9, # doctest: +SKIP
>>> 'b--', label=fr"RST $c_4 = {fcf_rst['c_4']:.4f} rad/mrad^4$") # doctest: +SKIP
>>> axes[0].plot(fit_obj.thetas, fit_obj.model(fit['fit']) * fit_obj.ref_ap * 1e9, # doctest: +SKIP
>>> 'b--', label=fr"RST $c_4 = {fit['c_4']:.4f} rad/mrad^4$") # doctest: +SKIP
>>> axes[0].set_title('Angular displacements, nrad', fontsize=20) # doctest: +SKIP
>>> # doctest: +SKIP
>>> axes[1].plot(fit_obj.thetas, fit_obj.phase, 'b') # doctest: +SKIP
>>> axes[1].plot(fit_obj.thetas, fit_obj.model(fcf_rst['ph_fit']), 'b--', # doctest: +SKIP
>>> label=fr"RST $c_4={fcf_rst['c_4']:.4f} rad/mrad^4$") # doctest: +SKIP
>>> axes[1].plot(fit_obj.thetas, fit_obj.model(fit['ph_fit']), 'b--', # doctest: +SKIP
>>> label=fr"RST $c_4={fit['c_4']:.4f} rad/mrad^4$") # doctest: +SKIP
>>> axes[1].set_title('Phase, rad', fontsize=20) # doctest: +SKIP
>>> for ax in axes: # doctest: +SKIP
>>> ax.legend(fontsize=15) # doctest: +SKIP
......
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