-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from LRydin/v0.4
Merging with dev.
- Loading branch information
Showing
12 changed files
with
106 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,21 @@ | ||
Installation | ||
============ | ||
|
||
For the moment the library is available from TestPyPI, so you can use | ||
:code:`MFDFA` is available from PyPI, so you can use | ||
|
||
:: | ||
|
||
pip install -i https://test.pypi.org/simple/ MFDFA | ||
pip install MFDFA | ||
|
||
Then on your favourite editor just use | ||
|
||
.. code:: python | ||
from MFDFA import MFDFA | ||
.. warning:: | ||
To use the extension to include Empirical Mode Decomposition detrending you will also need | ||
|
||
:: | ||
|
||
pip install EMD-signal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
numpy | ||
EMD-signal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import numpy as np | ||
|
||
import sys | ||
sys.path.append("../") | ||
from MFDFA import MFDFA | ||
|
||
def test_MFDFA(): | ||
for N in [1000, 10000]: | ||
for q_list in [1, 2, 6, 21]: | ||
|
||
X = np.random.normal(size = N, loc = 0) | ||
q = np.linspace(-10, 10, q_list) | ||
|
||
lag = np.unique( | ||
np.logspace( | ||
0, np.log10(X.size // 4), 25 | ||
).astype(int) + 1 | ||
) | ||
|
||
lag, dfa = MFDFA(X, lag = lag, q = q, order = 0, | ||
modified = True, stat = False, extensions = {'EMD': [0]}) | ||
|
||
assert dfa.ndim == 2, "Output is not 2 dimensional" | ||
assert dfa.shape[1] <= q.shape[0], "Output shape mismatch" | ||
|
||
lag, dfa, edfa = MFDFA(X, lag = lag, q = q, order = 1, | ||
modified = True, stat = False, | ||
extensions = {'eDFA':True, 'EMD': [0]}) | ||
|
||
assert dfa.ndim == 2, "Output is not 2 dimensional" | ||
assert edfa.ndim == 2, "Output is not 2 dimensional" | ||
assert dfa.shape[1] <= q.shape[0], "Output shape mismatch" |