-
Notifications
You must be signed in to change notification settings - Fork 8
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 #15 from fabiansinz/master
lgtm
- Loading branch information
Showing
7 changed files
with
60 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[run] | ||
source = thunderfish |
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 @@ | ||
repo_token: b2SXUJqkxFFdvCWzQEHqCWS4Rxh5tUgAo |
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,29 @@ | ||
sudo: false | ||
|
||
language: python | ||
|
||
python: | ||
- 2.7 | ||
|
||
addons: | ||
apt: | ||
packages: | ||
- python-numpy | ||
- python-scipy | ||
- python-matplotlib | ||
- python-pandas | ||
- python-tk | ||
|
||
virtualenv: | ||
system_site_packages: true | ||
|
||
install: | ||
- pip install git+https://github.com/G-Node/python-odml.git | ||
- pip install -r requirements.txt | ||
- pip install nose nose-cov python-coveralls | ||
# command to run tests | ||
script: | ||
- nosetests -vv --with-coverage --cover-package=thunderfish | ||
|
||
after_success: | ||
- coveralls |
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,6 @@ | ||
numpy | ||
matplotlib | ||
scipy | ||
seaborn | ||
ipython | ||
audioread |
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,17 @@ | ||
import numpy as np | ||
from nose.tools import assert_true | ||
|
||
from thunderfish.Auxiliary import peakdet | ||
|
||
|
||
def test_peakdet(): | ||
"""Tests whether peakdet works corretly""" | ||
x = np.zeros(1000) | ||
peaks = np.random.randint(0,len(x), size=20) | ||
peaks.sort() | ||
while np.any(np.diff(peaks).min() < 2): | ||
peaks = np.random.randint(0,len(x), size=20) | ||
peaks.sort() | ||
x[peaks] = 5 | ||
maxtab, maxidx, _, _ = peakdet(x, 2) | ||
assert_true(np.all(maxidx == peaks), "Peaks were not detected correctly") |