diff --git a/src/instruments/thorlabs/lcc25.py b/src/instruments/thorlabs/lcc25.py index f4ab4ef9..69051b6c 100644 --- a/src/instruments/thorlabs/lcc25.py +++ b/src/instruments/thorlabs/lcc25.py @@ -133,7 +133,7 @@ def name(self): voltage1 = unitful_property( "volt1", u.V, - format_code="{:.1f}", + format_code="{:.3f}", set_fmt="{}={}", valid_range=(0, 25), doc=""" @@ -148,7 +148,7 @@ def name(self): voltage2 = unitful_property( "volt2", u.V, - format_code="{:.1f}", + format_code="{:.3f}", set_fmt="{}={}", valid_range=(0, 25), doc=""" @@ -163,7 +163,7 @@ def name(self): min_voltage = unitful_property( "min", u.V, - format_code="{:.1f}", + format_code="{:.3f}", set_fmt="{}={}", valid_range=(0, 25), doc=""" @@ -178,7 +178,7 @@ def name(self): max_voltage = unitful_property( "max", u.V, - format_code="{:.1f}", + format_code="{:.3f}", set_fmt="{}={}", valid_range=(0, 25), doc=""" @@ -209,7 +209,7 @@ def name(self): increment = unitful_property( "increment", units=u.V, - format_code="{:.1f}", + format_code="{:.3f}", set_fmt="{}={}", valid_range=(0, None), doc=""" diff --git a/tests/test_thorlabs/test_thorlabs_lcc25.py b/tests/test_thorlabs/test_thorlabs_lcc25.py index 5cc9bf1b..f09f1823 100644 --- a/tests/test_thorlabs/test_thorlabs_lcc25.py +++ b/tests/test_thorlabs/test_thorlabs_lcc25.py @@ -115,8 +115,8 @@ def test_tc200_remote_invalid_type(): def test_lcc25_voltage1(): with expected_protocol( ik.thorlabs.LCC25, - ["volt1?", "volt1=10.0"], - ["volt1?", "20", "> volt1=10.0", "> "], + ["volt1?", "volt1=10.000"], + ["volt1?", "20", "> volt1=10.000", "> "], sep="\r", ) as lcc: unit_eq(lcc.voltage1, u.Quantity(20, "V")) @@ -134,9 +134,9 @@ def test_lcc25_voltage2(): ik.thorlabs.LCC25, [ "volt2?", - "volt2=10.0", + "volt2=10.000", ], - ["volt2?", "20", "> volt2=10.0", "> "], + ["volt2?", "20", "> volt2=10.000", "> "], sep="\r", ) as lcc: unit_eq(lcc.voltage2, u.Quantity(20, "V")) @@ -146,8 +146,8 @@ def test_lcc25_voltage2(): def test_lcc25_minvoltage(): with expected_protocol( ik.thorlabs.LCC25, - ["min?", "min=10.0"], - ["min?", "20", "> min=10.0", "> "], + ["min?", "min=10.000"], + ["min?", "20", "> min=10.000", "> "], sep="\r", ) as lcc: unit_eq(lcc.min_voltage, u.Quantity(20, "V")) @@ -157,8 +157,8 @@ def test_lcc25_minvoltage(): def test_lcc25_maxvoltage(): with expected_protocol( ik.thorlabs.LCC25, - ["max?", "max=10.0"], - ["max?", "20", "> max=10.0", "> "], + ["max?", "max=10.000"], + ["max?", "20", "> max=10.000", "> "], sep="\r", ) as lcc: unit_eq(lcc.max_voltage, u.Quantity(20, "V")) @@ -186,8 +186,8 @@ def test_lcc25_dwell_positive(): def test_lcc25_increment(): with expected_protocol( ik.thorlabs.LCC25, - ["increment?", "increment=10.0"], - ["increment?", "20", "> increment=10.0", "> "], + ["increment?", "increment=10.000"], + ["increment?", "20", "> increment=10.000", "> "], sep="\r", ) as lcc: unit_eq(lcc.increment, u.Quantity(20, "V"))