getuserdark, getfactorydark
This commit is contained in:
2
dump.py
2
dump.py
@@ -44,6 +44,8 @@ LINES = [
|
|||||||
('Irradiance', ilt.GetIrradiance, ''),
|
('Irradiance', ilt.GetIrradiance, ''),
|
||||||
('Clock frequency', ilt.GetClockFrequencyHz, '㎐'),
|
('Clock frequency', ilt.GetClockFrequencyHz, '㎐'),
|
||||||
('Feedback resistance', ilt.GetFeedbackResistanceOhm, 'Ω'),
|
('Feedback resistance', ilt.GetFeedbackResistanceOhm, 'Ω'),
|
||||||
|
('Factory dark', ilt.GetFactoryDarkVoltages, 'V'),
|
||||||
|
('User dark', ilt.GetUserDarkVoltages, 'V'),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
19
ilt1000.py
19
ilt1000.py
@@ -47,7 +47,6 @@ class CommandError(Error):
|
|||||||
# setcurrentloop
|
# setcurrentloop
|
||||||
|
|
||||||
# setuserdark
|
# setuserdark
|
||||||
# getuserdark
|
|
||||||
# setfactorydark
|
# setfactorydark
|
||||||
|
|
||||||
# startlogdata
|
# startlogdata
|
||||||
@@ -257,18 +256,18 @@ class ILT1000(object):
|
|||||||
self._SendCommandOrDie(self._DARK_MODE_COMMANDS[mode])
|
self._SendCommandOrDie(self._DARK_MODE_COMMANDS[mode])
|
||||||
|
|
||||||
def GetFactoryDarkVoltages(self):
|
def GetFactoryDarkVoltages(self):
|
||||||
# SPEC ERROR
|
|
||||||
# Actual return value sample:
|
|
||||||
# R1 12149 9733 9251 R2 12476 10080 9604 R3 13940 11894 11435
|
|
||||||
ret = self._SendCommand('getfactorydark')
|
ret = self._SendCommand('getfactorydark')
|
||||||
return [float(x) / 1000000 for x in ret.split()]
|
values = ret.split(' ')
|
||||||
|
return [
|
||||||
|
[float(values[4 * r + i + 1]) / 1000000 for i in range(3)]
|
||||||
|
for r in range(3)]
|
||||||
|
|
||||||
def GetUserDarkVoltages(self):
|
def GetUserDarkVoltages(self):
|
||||||
# SPEC ERROR
|
ret = self._SendCommand('getuserdark')
|
||||||
# Actual return value sample:
|
values = ret.split(' ')
|
||||||
# R1 12149 9733 9251 R2 12476 10080 9604 R3 13940 11894 11435
|
return [
|
||||||
ret = self._SendCommand('getfactorydark')
|
[float(values[4 * r + i + 1]) / 1000000 for i in range(3)]
|
||||||
return [float(x) / 1000000 for x in ret.split()]
|
for r in range(3)]
|
||||||
|
|
||||||
def GetClockFrequencyHz(self):
|
def GetClockFrequencyHz(self):
|
||||||
ret = self._SendCommand('getclockfreq')
|
ret = self._SendCommand('getclockfreq')
|
||||||
|
|||||||
Reference in New Issue
Block a user