-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- add option in nm_stream_offline to pass data
- add option in nm_stream to add feature_sampling_frequency_hz - fix path in examples to data is loaded by absolute path - add test for running all examples
- Loading branch information
Showing
8 changed files
with
134 additions
and
34 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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from pathlib import Path | ||
import pytest | ||
import subprocess | ||
|
||
@pytest.mark.parametrize("example_filename", Path('examples').glob('*.py')) | ||
def test_run_through_all_test(example_filename): | ||
print(f'Running {example_filename}') | ||
subprocess.run(['python', example_filename], check=True) |
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,14 @@ | ||
import numpy as np | ||
|
||
import py_neuromodulation as nm | ||
|
||
|
||
def test_stream_init(): | ||
"""Test if stream initialization with passed data will setup nm_channels correctly | ||
""" | ||
data = np.random.random((10, 1000)) | ||
sfreq = 100 | ||
stream = nm.Stream(sfreq=sfreq, data=data, sampling_rate_features_hz=11) | ||
|
||
assert stream.nm_channels.shape[0] == 10 | ||
assert stream.settings["sampling_rate_features_hz"] == 11 |