Skip to content

Commit a7e8039

Browse files
committed
add some scalar annotations
1 parent fca2043 commit a7e8039

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

neo/test/rawiotest/test_intanrawio.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import unittest
2+
import numpy as np
23

34
from neo.rawio.intanrawio import IntanRawIO
4-
55
from neo.test.rawiotest.common_rawio_test import BaseTestRawIO
66

77

@@ -31,6 +31,7 @@ def test_annotations(self):
3131
signal_annotations = annotations["signals"][0] # As in the other exmaples, annotaions are duplicated
3232

3333

34+
# Scalar annotations
3435
exepcted_annotations = {'intan_version': '1.5', 'desired_impedance_test_frequency': 1000.0, 'desired_upper_bandwidth': 7500.0, 'note1': '', 'notch_filter_mode': 1, 'notch_filter': False, 'nb_signal_group': 7,
3536
'dsp_enabled': 1, 'actual_impedance_test_frequency': 1000.0, 'desired_lower_bandwidth': 0.1, 'note3': '', 'actual_dsp_cutoff_frequency': 1.165828,
3637
'desired_dsp_cutoff_frequency': 1.0, 'actual_lower_bandwidth': 0.0945291, 'eval_board_mode': 0, 'note2': '', 'num_temp_sensor_channels': 0}
@@ -41,6 +42,10 @@ def test_annotations(self):
4142
else:
4243
self.assertEqual(signal_annotations[key], exepcted_annotations[key])
4344

44-
45+
# Array annotations
46+
signal_array_annotations = signal_annotations["__array_annotations__"]
47+
np.testing.assert_array_equal(signal_array_annotations["native_order"][:10], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
48+
np.testing.assert_array_equal(signal_array_annotations["spike_scope_digital_edge_polarity"][:10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1])
49+
np.testing.assert_array_equal(signal_array_annotations["board_stream_num"][:10], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
4550
if __name__ == "__main__":
4651
unittest.main()

0 commit comments

Comments
 (0)