File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ def add_sample_count(
9191 )
9292
9393 # get the systime information
94- systime = np .array (rec_dci .timestamps ) * NANOSECONDS_PER_SECOND
94+ systime = np .array (rec_dci .timestamps )
9595 # get the sample count information
9696 trodes_sample = np .concatenate (
9797 [neo_io .get_analogsignal_timestamps (0 , None ) for neo_io in rec_dci .neo_io ]
Original file line number Diff line number Diff line change 1010from trodes_to_nwb .tests .test_convert_rec_header import default_test_xml_tree
1111from trodes_to_nwb .tests .utils import data_path
1212
13+ NANOSECONDS_PER_SECOND = 1e9
14+
1315
1416def test_add_epochs ():
1517 metadata_path = data_path / "20230622_sample_metadata.yml"
@@ -69,7 +71,8 @@ def test_add_sample_count():
6971 == old_nwbfile .processing ["sample_count" ]["sample_count" ].data [:]
7072 ).all ()
7173 assert np .allclose (
72- read_nwbfile .processing ["sample_count" ]["sample_count" ].timestamps [:],
74+ read_nwbfile .processing ["sample_count" ]["sample_count" ].timestamps [:]
75+ * NANOSECONDS_PER_SECOND , # Account for error in old file timestamps
7376 old_nwbfile .processing ["sample_count" ]["sample_count" ].timestamps [:],
7477 rtol = 0 ,
7578 atol = (1.0 / 30000 ) * 1e9 ,
You can’t perform that action at this time.
0 commit comments