Skip to content

Commit

Permalink
DOC: Update on FIXE and FIXE_H params
Browse files Browse the repository at this point in the history
* Explain FIXE and FIXE_H params
* Fix few typo
* Copyright until forever!
  • Loading branch information
laszukdawid committed May 6, 2018
1 parent bde8b22 commit cede216
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 7 deletions.
8 changes: 4 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ deliver more in time.

EMD variations:
- Ensemble EMD (EEMD),
- Image decomposotion (EMD2D),
- "Complete Ensembl EMD" (CEEMDAN)
- Image decomposition (EMD2D),
- "Complete Ensemble EMD" (CEEMDAN)
- different settings and configurations of vanilla EMD.

*PyEMD* allows to use different splines for envelopes, stopping criteria
Expand Down Expand Up @@ -92,7 +92,7 @@ The Figure below was produced with input:
EEMD
====

Simplest case of using Esnembld EMD (EEMD) is by importing ``EEMD`` and passing
Simplest case of using Ensemble EMD (EEMD) is by importing ``EEMD`` and passing
your signal to the instance or ``eemd()`` method.

.. code:: python
Expand Down Expand Up @@ -123,7 +123,7 @@ EMD2D

Simplest case is to pass image as monochromatic numpy 2D array.
As with other modules one can use default setting of instance or
more expliclity use ``emd2d()`` method.
more explicitly use ``emd2d()`` method.

.. code:: python
Expand Down
7 changes: 4 additions & 3 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import datetime
import os
import sys

Expand Down Expand Up @@ -63,17 +64,17 @@

# General information about the project.
project = u'PyEMD'
copyright = u'2017, Dawid Laszuk'
copyright = u'2016-{year}, Dawid Laszuk'.format(year=datetime.datetime.now().year)
author = u'Dawid Laszuk'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = u'0.2.02'
version = u'0.2.03'
# The full version, including alpha/beta/rc tags.
release = u'0.2.02'
release = u'0.2.03'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
1 change: 1 addition & 0 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Writing documentation is hard. If more clarifications are needed, or you think o
:caption: Table of Content

intro
usage
examples
emd
eemd
Expand Down
55 changes: 55 additions & 0 deletions doc/usage.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
Usage
=============

Typical Usage
-------------

Majority, if not all, methods follow the same usage pattern:

* Import method
* Initiate method
* Apply method on data

On vanilla EMD this is as

.. code-block:: python
from PyEMD import EMD
emd = EMD()
imfs = emd(s)
Parameters
----------

The decomposition can be changed by adjusting parameters related to either sifting or stopping conditions.

Sifting
```````
The sifting depends on the used method so these parameters ought to be looked within the methods.
However, the typical parameters relate to spline method or the number of mirroring points.


Stopping conditions
```````````````````
All methods have the same two conditions, `FIXE` and `FIXE_H`, for stopping which relate to the number of sifting iterations.
Setting parameter `FIXE` to any positive value will fix the number of iterations for each IMF to be exactly `FIXE`.

Example:

.. code-block:: python
emd = EMD()
emd.FIXE = 10
imfs = emd(s)
Parameter `FIXE_H` relates to the number of iterations when the proto-IMF signal fulfils IMF conditions, i.e. number of extrema and zero-crossings differ at most by one and the mean is close to zero. This means that there will be at least `FIXE_H` iteration per IMF.

Example:

.. code-block:: python
emd = EMD()
emd.FIXE_H = 5
imfs = emd(s)
When both `FIXE` and `FIXE_H` are 0 then other conditions are checked. These can be checking for convergence between consecutive iterations or whether the amplitude of output is below acceptable range.

0 comments on commit cede216

Please sign in to comment.