Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/instruments/thorlabs/lcc25.py
Original file line number Diff line number Diff line change
Expand Up @@ -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="""
Expand All @@ -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="""
Expand All @@ -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="""
Expand All @@ -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="""
Expand Down Expand Up @@ -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="""
Expand Down
20 changes: 10 additions & 10 deletions tests/test_thorlabs/test_thorlabs_lcc25.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand All @@ -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"))
Expand All @@ -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"))
Expand All @@ -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"))
Expand Down Expand Up @@ -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"))
Expand Down
Loading