Skip to content

Commit 8b4eef8

Browse files
committed
Update docs
1 parent 41b90b9 commit 8b4eef8

File tree

3 files changed

+43
-2
lines changed

3 files changed

+43
-2
lines changed

docs/source/index.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,11 @@ Using EPRpy
6767
----------------------
6868

6969
.. toctree::
70-
:maxdepth: 2
70+
:maxdepth: 1
7171
:caption: User guide
7272

7373

7474
loading
75+
processing
7576
EprData
7677

docs/source/loading.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ Data can be loaded into an ``EprData`` object by using the ``load(filepath)`` fu
1515
epr_data = epr.load('tempo.DSC')
1616
1717
18-
``epr_data`` is an :doc:`EprData <EprData>` data object with various accessible attributes. For instance the loaded data can be accessed by ``epr_data.data``.
18+
``epr_data`` is an :doc:`EprData <EprData>` data object with various accessible attributes. For instance. the loaded data can be accessed by ``epr_data.data``.

docs/source/processing.rst

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
Operations on data
2+
============================
3+
4+
After loading the data into an ``EprData`` object, following functions can be used to perform various operations on the data. Since the data is stored as NumPy arrays, all artihmetic operations
5+
whihc are valid on NumPy arrays are also valid on attributes of ``EprData`` which are NumPy arrays, such as ``data``, ``x`` and ``y``.
6+
Please note that, unless otherwise specified, all operations on the data are done in place i.e. a new object is not returned. After each operation, a history entry is added to the history of the ``EprData`` object.
7+
Calling the ``undo`` method of any ``EprData`` object will return the ``EprData`` object before the last operation on the data.
8+
9+
Scaling
10+
************
11+
Data in an ``EprData`` object can be scaled between two values using the ``scale_between`` method.
12+
There are two optional inputs ``min_val`` and ``max_val``, which correspond to the minimum and maximum value of the range within which the data will be scaled.
13+
If no inputs are given, the data is scaled between 0 and 1.
14+
15+
Computing Integrals
16+
***********************
17+
Integrals can be calculated using the ``integral`` method of the ``EprData`` class.
18+
Since CW-EPR data is usually acuqired as firtst-derivatives, the function should be called twice for a double integral calculation.
19+
20+
Baseline Correction
21+
***********************
22+
Baseline correction in EPRpy supports 1D and 2D data and allows for interactive selection of baseline points. Baseline points in case of 2D data are selected using the first slice of the data.
23+
The baseline can be fitted using linear, polynomial, or spline methods. To correct the baseline, ``baseline_correct`` method of the ``EprData`` class can be used.
24+
Basline correction accepts various inputs :
25+
26+
* *interactive* : If set to True, this will plot the data with an option to sleect points interactively. These points will then be used for the calculatinh the baseline.
27+
* *npts* : Another way of specifying points. When *interactive* is set to False, npts is equal to the number of points at the start and end of the data which is used for baseline correction.
28+
* *method* : Should be one of 'linear', 'polynomial' and 'spline'.
29+
* *order* : Specifies the polynomial order in case of *method* 'polynomial'.
30+
* *spline_smooth* : Smoothing factor of the spline, in case of *method* 'spline'.
31+
32+
Selecting a region
33+
********************
34+
This operation returns a new ``EprData`` object, which corresponds to selected region of the data (or spectrum). The operation is always carried out on the last axis of the data
35+
and needs a list of indices as input which corresponds to the desired region.
36+
37+
Undoing changes
38+
*******************
39+
Any data operation can be undone and the original ``EprData`` object just before the operation can be obtained by using the ``undo`` method of the ``EprData`` class.
40+
Note that any previous ``EprData`` object can be accessed by using the ``history`` attribute of the ``EprData`` object.

0 commit comments

Comments
 (0)