-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added an integration tests revealing parser bug * Revert "Merge pull request #11 from MideTechnology/feature/10_parser-optimization" This reverts commit a045a8e, reversing changes made to aefe43d. * Revert "Revert "Merge pull request #11 from MideTechnology/feature/10_parser-optimization"" This reverts commit aeff0ad. The original reversion confirms that the issue is not related to archive/#11; with that confirmed, the original reversion may be removed * removed code causing deprecation warnings * manually specified in numpy parser standardized mapping from struct to numpy typestrings * added sanity checks for integrity of typestring conversions * moved typestring assertion to unit tests
- Loading branch information
Showing
5 changed files
with
84 additions
and
6 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
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,42 @@ | ||
import os.path | ||
|
||
import pytest # type: ignore | ||
import idelib | ||
|
||
|
||
@pytest.mark.parametrize('filename', [ | ||
os.path.join('testing', 'test3.IDE'), | ||
]) | ||
def test_integ_channels(filename): | ||
with idelib.importFile(filename) as ds: | ||
assert {i for i in ds.channels.keys()} == {8, 36, 59, 70, 80, 84} | ||
|
||
accel100g_ch = ds.channels[8] | ||
data = accel100g_ch.getSession().arraySlice() | ||
assert data.shape[0] == 5 # t, x, y, z, mic | ||
assert data.size > 0 | ||
|
||
accel40g_ch = ds.channels[80] | ||
data = accel40g_ch.getSession().arraySlice() | ||
assert data.shape[0] == 4 # t, x, y, z | ||
assert data.size > 0 | ||
|
||
rot_ch = ds.channels[84] | ||
data = rot_ch.getSession().arraySlice() | ||
assert data.shape[0] == 4 # t, x, y, z | ||
assert data.size > 0 | ||
|
||
orient_ch = ds.channels[70] | ||
data = orient_ch.getSession().arraySlice() | ||
assert data.shape[0] == 5 # t, x, y, z, w | ||
assert data.size > 0 | ||
|
||
pt_ch = ds.channels[36] | ||
data = pt_ch.getSession().arraySlice() | ||
assert data.shape[0] == 3 # t, press, temp | ||
assert data.size > 0 | ||
|
||
pt_ctrl_ch = ds.channels[59] | ||
data = pt_ctrl_ch.getSession().arraySlice() | ||
assert data.shape[0] == 3 # t, press, temp | ||
assert data.size > 0 |
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