fix
This commit is contained in:
@ -20,6 +20,8 @@ from rfg_adc_plotter.gui.pyqtgraph_backend import (
|
||||
convert_tty_i16_to_voltage,
|
||||
decimate_bscan_rows_for_display,
|
||||
decimate_curve_for_display,
|
||||
display_distance_axis,
|
||||
display_distance_value,
|
||||
fft_bscan_image_to_db,
|
||||
is_short_sweep,
|
||||
resolve_axis_bounds,
|
||||
@ -546,6 +548,13 @@ class ProcessingTests(unittest.TestCase):
|
||||
self.assertTrue(bool(keep_mask[-1]))
|
||||
self.assertAlmostEqual(float(cut_axis[0]), 3.0, places=6)
|
||||
|
||||
def test_display_distance_axis_zero_is_at_nine_meters(self):
|
||||
axis = np.asarray([0.0, 4.5, 9.0], dtype=np.float64)
|
||||
display_axis = display_distance_axis(axis)
|
||||
|
||||
np.testing.assert_allclose(display_axis, np.asarray([9.0, 4.5, 0.0], dtype=np.float64))
|
||||
self.assertAlmostEqual(display_distance_value(9.0), 0.0, places=12)
|
||||
|
||||
def test_resolve_initial_window_size_stays_within_small_screen(self):
|
||||
width, height = resolve_initial_window_size(800, 480)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user