Skip to content

Commit

Permalink
Fix remaining tests and drivers
Browse files Browse the repository at this point in the history
  • Loading branch information
scasagrande committed Sep 2, 2020
1 parent 290cea7 commit 2ab8393
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions instruments/tests/test_srs/test_srsdg645.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def test_srsdg645_channel_delay():
ik.srs.SRSDG645,
[
"DLAY?2",
"DLAY 3,2,60.0",
"DLAY 3,2,60",
"DLAY 5,4,10"
],
[
Expand Down Expand Up @@ -226,7 +226,7 @@ def test_srsdg645_holdoff():
"+0.001001000000"
]
) as ddg:
assert ddg.holdoff == u.Quantity(1001, u.us)
assert u.Quantity(1001, u.us) == ddg.holdoff
ddg.holdoff = 0
ddg.holdoff = u.Quantity(10, u.ms) # unitful hold off

Expand Down
4 changes: 2 additions & 2 deletions instruments/tests/test_teledyne/test_maui.py
Original file line number Diff line number Diff line change
Expand Up @@ -588,8 +588,8 @@ def test_maui_math_op_rescale(init):
],
sep="\n"
) as osc:
osc.math[0].operator.to(2)
osc.math[0].operator.to(2, multiplier=10.3, adder=1.3)
osc.math[0].operator.rescale(2)
osc.math[0].operator.rescale(2, multiplier=10.3, adder=1.3)


def test_maui_math_op_sinx(init):
Expand Down
20 changes: 10 additions & 10 deletions instruments/thorlabs/thorlabsapt.py
Original file line number Diff line number Diff line change
Expand Up @@ -1117,20 +1117,20 @@ class MotorChannel(ThorLabsAPT.APTChannel):
# Note that for these drivers, the scale factors are identical
# for position, velcoity and acceleration. This is not true for
# all drivers!
'DRV001': (u.Quantity(51200, 'ct/mm'),) * 3,
'DRV013': (u.Quantity(25600, 'ct/mm'),) * 3,
'DRV014': (u.Quantity(25600, 'ct/mm'),) * 3,
'DRV113': (u.Quantity(20480, 'ct/mm'),) * 3,
'DRV114': (u.Quantity(20480, 'ct/mm'),) * 3,
'FW103': (u.Quantity(25600 / 360, 'ct/deg'),) * 3,
'NR360': (u.Quantity(25600 / 5.4546, 'ct/deg'),) * 3
'DRV001': (u.Quantity(51200, 'count/mm'),) * 3,
'DRV013': (u.Quantity(25600, 'count/mm'),) * 3,
'DRV014': (u.Quantity(25600, 'count/mm'),) * 3,
'DRV113': (u.Quantity(20480, 'count/mm'),) * 3,
'DRV114': (u.Quantity(20480, 'count/mm'),) * 3,
'FW103': (u.Quantity(25600 / 360, 'count/deg'),) * 3,
'NR360': (u.Quantity(25600 / 5.4546, 'count/deg'),) * 3
},

re.compile('TDC001|KDC101'): {
'MTS25-Z8': (1 / u.Quantity(34304, 'mm/ct'), NotImplemented, NotImplemented),
'MTS50-Z8': (1 / u.Quantity(34304, 'mm/ct'), NotImplemented, NotImplemented),
'MTS25-Z8': (1 / u.Quantity(34304, 'mm/count'), NotImplemented, NotImplemented),
'MTS50-Z8': (1 / u.Quantity(34304, 'mm/count'), NotImplemented, NotImplemented),
# TODO: Z8xx and Z6xx models. Need to add regex support to motor models, too.
'PRM1-Z8': (u.Quantity(1919.64, 'ct/deg'), NotImplemented, NotImplemented),
'PRM1-Z8': (u.Quantity(1919.64, 'count/deg'), NotImplemented, NotImplemented),
}
}

Expand Down

0 comments on commit 2ab8393

Please sign in to comment.