You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/EprData.rst
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,10 +6,10 @@ EprData class
6
6
7
7
* **data_dict** : A python dictionary with the data, acquisition parameters, filepath etc.
8
8
* **filepath** : The filepath of the .DSC or .DTA file
9
-
* **data** : The raw data which is read from the .DTA file.
9
+
* **data** : The raw data which is read from the .DTA file stored as a NumPy array
10
10
* **dims** : A list of arrays which define each dimension of the data. For instance, for a simple 1D-EPR spectrum, dims contains the field values.
11
-
* **x** : Array corresponding to the abscissa of the data
12
-
* **y** : Array corresponding to the ordinate of the data (only defined in case of 2-D data, otherwise is ``None``.)
11
+
* **x** : NumPy array corresponding to the abscissa of the data
12
+
* **y** : NumPy array corresponding to the ordinate of the data (only defined in case of 2-D data, otherwise is ``None``.)
13
13
* **is_complex** : A boolean flag which indicates if the data is of complex type (i.e. also contains imaginary values)
14
14
* **acq_param** : A python dictionary of acquisition parameters which were read from the .DSC file.
15
15
* **history** : Describes the history of the ``EprData`` object. This attribute is a list of lists, with each element in the main list containing a string desrcribing the processing step and the corresponding ``EprData`` object.
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.
4
+
After loading the data into an :doc:`EprData <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
+
which are valid on NumPy arrays are also valid on attributes of :doc:`EprData <EprData>` which are NumPy arrays, such as ``data``, ``x`` and ``y``.
6
+
7
+
.. note::
8
+
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.
9
+
Calling the ``undo`` method of any ``EprData`` object will return the ``EprData`` object before the last operation on the data.
8
10
9
11
Scaling
10
12
************
11
13
Data in an ``EprData`` object can be scaled between two values using the ``scale_between`` method.
12
14
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
15
If no inputs are given, the data is scaled between 0 and 1.
14
16
17
+
See `how to scale data between two values <notebooks/examples.html#Scaling-data>`_.
18
+
15
19
Computing Integrals
16
20
***********************
17
21
Integrals can be calculated using the ``integral`` method of the ``EprData`` class.
18
22
Since CW-EPR data is usually acuqired as firtst-derivatives, the function should be called twice for a double integral calculation.
19
23
24
+
See `computing integrals <notebooks/examples.html#Computing-integrals>`_.
25
+
20
26
Baseline Correction
21
27
***********************
22
28
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.
@@ -29,12 +35,14 @@ Basline correction accepts various inputs :
29
35
* *order* : Specifies the polynomial order in case of *method* 'polynomial'.
30
36
* *spline_smooth* : Smoothing factor of the spline, in case of *method* 'spline'.
31
37
38
+
See a `baseline correction example <notebooks/examples.html#Baseline-correction>`_.
39
+
32
40
Selecting a region
33
41
********************
34
42
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.
43
+
and needs a list of indices as input which corresponds to the desired region. See `selecting a region <notebooks/examples.html#Selecting-a-region>`_.
36
44
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.
45
+
History of data operations
46
+
********************************
47
+
Any previous ``EprData`` object can be accessed by using the ``history`` attribute of the ``EprData`` object. Each ``EprData`` object stores history of all data operations and the corresponding ``EprData`` object in a list of lists.
48
+
The first item in each list is the description of the data operation and the second item is the corresponding ``EprData`` object. See `how to access history <notebooks/examples.html#History-of-data-operations>`_.
0 commit comments