-
Notifications
You must be signed in to change notification settings - Fork 6
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 #195 from SainsburyWellcomeCentre/gl-issue-186-fil…
…tering-nonchunked-data Ensure each chunk is compared against filter bounds
- Loading branch information
Showing
6 changed files
with
62 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 added
BIN
+31.3 KB
tests/data/monotonic/2022-06-13T13_14_25/Patch2/Patch2_90_2022-06-13T12-00-00.bin
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,11 @@ | ||
{ | ||
"Workflow": "Experiment0.2.bonsai", | ||
"Commit": "249cdc654af63e6959e64f7ff2c21f219cc912ea", | ||
"Devices": { | ||
"VideoController": { | ||
"PortName": "COM3", | ||
"GlobalTriggerFrequency": "50", | ||
"LocalTriggerFrequency": "125" | ||
} | ||
} | ||
} |
Binary file added
BIN
+160 Bytes
tests/data/nonmonotonic/2022-06-06T09-24-28/Patch2/Patch2_90_2022-06-06T13-00-00.bin
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 pytest | ||
from pytest import mark | ||
import aeon.io.api as aeon | ||
from aeon.schema.dataset import exp02 | ||
import pandas as pd | ||
|
||
@mark.api | ||
def test_load_start_only(): | ||
data = aeon.load( | ||
'./tests/data/nonmonotonic', | ||
exp02.Patch2.Encoder, | ||
start=pd.Timestamp('2022-06-06T13:00:49')) | ||
assert len(data) > 0 | ||
|
||
@mark.api | ||
def test_load_end_only(): | ||
data = aeon.load( | ||
'./tests/data/nonmonotonic', | ||
exp02.Patch2.Encoder, | ||
end=pd.Timestamp('2022-06-06T13:00:49')) | ||
assert len(data) > 0 | ||
|
||
@mark.api | ||
def test_load_filter_nonchunked(): | ||
data = aeon.load( | ||
'./tests/data/nonmonotonic', | ||
exp02.Metadata, | ||
start=pd.Timestamp('2022-06-06T09:00:00')) | ||
assert len(data) > 0 | ||
|
||
@mark.api | ||
def test_load_monotonic(): | ||
data = aeon.load('./tests/data/monotonic', exp02.Patch2.Encoder) | ||
assert data.index.is_monotonic_increasing | ||
|
||
@mark.api | ||
def test_load_nonmonotonic(): | ||
data = aeon.load('./tests/data/nonmonotonic', exp02.Patch2.Encoder) | ||
assert not data.index.is_monotonic_increasing | ||
|
||
if __name__ == '__main__': | ||
pytest.main() |