Skip to content

Commit

Permalink
DOC: added selections to tutorial.
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentRDC committed Nov 21, 2019
1 parent 0a4152a commit 1a94abe
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions docs/tutorials/time_series.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Contents
========

* :ref:`fitting`
* :ref:`selection`

.. _fitting:

Expand Down Expand Up @@ -88,4 +89,28 @@ We can plot the result:
ax.legend()
plt.show()

.. _selection:

Selections
==========

In the context of ultrafast electron/x-ray scattering, time-series are assembled by selection a portion
of scattering patterns for each time-delay. The :class:`Selection` class (and related subclasses) is
the generalization of selecting a rectangular area of scattering patterns to arbitrary patterns,
e.g. disks, torii, etc.

Instances can be used like boolean masks to select portions of scattering patterns. Consider an example
where we want to know the integrated intensity in a Bragg peak::

from skued import DiskSelection, diffread

im = diffread(...)

bragg = DiskSelection(shape = im.shape, center=(1024, 1024), radius=30)
intensity = np.sum(im[bragg])

Selections really shine when trying to extract non-standard shapes, e.g. rings. You can use them
in combination with `iris-ued` `DiffractionDatasets` to assemble specialized time-series.


:ref:`Return to Top <timeseries_tutorial>`

0 comments on commit 1a94abe

Please sign in to comment.