@@ -89,6 +89,7 @@ def test_correct_reading_one_file_per_channel(self):
8989
9090
9191 def test_correct_decoding_of_stimulus_current (self ):
92+ # See https://github.com/NeuralEnsemble/python-neo/pull/1660 for discussion
9293
9394 file_path = Path (self .get_local_path ("intan/rhs_stim_data_single_file_format/intanTestFile.rhs" ))
9495 intan_reader = IntanRawIO (filename = file_path )
@@ -116,25 +117,23 @@ def test_correct_decoding_of_stimulus_current(self):
116117 # Check that negative pulse is leading
117118 argmin = np .argmin (data_to_test )
118119 argmax = np .argmax (data_to_test )
119-
120120 assert argmin < argmax
121-
122-
121+
123122 # Check that the negative pulse is 200 us long
124123 negative_pulse_frames = np .where (data_to_test > 0 )[0 ]
125124 number_of_negative_frames = negative_pulse_frames .size
126125 duration_of_negative_pulse = number_of_negative_frames / sampling_rate
127126
128127 expected_duration = 200 * 1e-6 # 400 microseconds / 2
129-
130- assert np . isclose ( duration_of_negative_pulse , expected_duration , rtol = 1e-05 , atol = 1e-08 )
131-
128+ assert np . isclose ( duration_of_negative_pulse , expected_duration )
129+
130+ # Check that the positive pulse is 200 us long
132131 positive_pulse_frames = np .where (data_to_test > 0 )[0 ]
133132 number_of_positive_frames = positive_pulse_frames .size
134133 duration_of_positive_pulse = number_of_positive_frames / sampling_rate
135134 expected_duration = 200 * 1e-6 # 400 microseconds / 2
136135
137- assert np .isclose (duration_of_positive_pulse , expected_duration , rtol = 1e-05 , atol = 1e-08 )
136+ assert np .isclose (duration_of_positive_pulse , expected_duration )
138137
139138
140139if __name__ == "__main__" :
0 commit comments