-
Notifications
You must be signed in to change notification settings - Fork 20
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 #109 from moorepants/modernize-period-fitting
Update calculating periods from mat files to work with Python 3 and other dependency changes.
- Loading branch information
Showing
11 changed files
with
118 additions
and
90 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,3 @@ pip-log.txt | |
|
||
#Mr Developer | ||
.mr.developer.cfg | ||
|
||
# matlab | ||
# mat files | ||
*.mat |
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
Binary file not shown.
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,26 @@ | ||
import os | ||
import numpy as np | ||
from bicycleparameters.io import load_pendulum_mat_file | ||
|
||
TESTS_DIR = os.path.dirname(__file__) | ||
|
||
|
||
def test_load_pendulum_mat_file(): | ||
path = os.path.join(TESTS_DIR, 'sample_data', | ||
'BrowserForkCompoundFirst1.mat') | ||
|
||
d = load_pendulum_mat_file(path) | ||
|
||
assert d['angle'] == 'First' | ||
assert d['ActualRate'] == 1000 | ||
assert d['bicycle'] == 'BrowserIns' | ||
assert d['data'].shape == (30000,) | ||
np.testing.assert_allclose( | ||
d['data'][0:5], | ||
np.array([0.33034183, 0.32525861, 0.31509219, 0.31509219, 0.33034183])) | ||
assert d['duration'] == 30 | ||
assert d['filename'] == 'BrowserInsForkCompoundFirst1' | ||
assert d['notes'] == '' | ||
assert d['part'] == 'Fork' | ||
assert d['pendulum'] == 'Compound' | ||
assert d['trial'] == '1' |
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 |
---|---|---|
|
@@ -17,6 +17,7 @@ dependencies: | |
- pandas >=1.3.5 | ||
- plotly | ||
# dev | ||
- ipython | ||
- nose | ||
- numpydoc >=1.2 | ||
- pytest | ||
|
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