This commit is contained in:
@@ -313,16 +313,16 @@ def stop_blm_ws(blm):
|
||||
caput(blm + ":WS_STOP.PROC", 1)
|
||||
|
||||
def set_blm_ws_gain(blm, gain):
|
||||
caput(blm + ":WS_PMT_GAIN_VOLTS", 1)
|
||||
caput(blm + ":WS_PMT_GAIN_VOLTS", float(gain))
|
||||
|
||||
def get_blm_ws_gain(blm, gain):
|
||||
caget(blm + ":WS_PMT_GAIN_VOLTS")
|
||||
def get_blm_ws_gain(blm):
|
||||
return caget(blm + ":WS_PMT_GAIN_VOLTS")
|
||||
|
||||
|
||||
def set_blm_ws_att(blm, att):
|
||||
caput(blm + ":WS_PMT_ATT_VOLTS", 1)
|
||||
caput(blm + ":WS_PMT_ATT_VOLTS", att)
|
||||
|
||||
def get_blm_ws_att(blm, att):
|
||||
def get_blm_ws_att(blm):
|
||||
"""
|
||||
string 0: Reference
|
||||
string 1: "2 dB"
|
||||
@@ -341,4 +341,4 @@ def get_blm_ws_att(blm, att):
|
||||
string 14: 28 dB
|
||||
string 15: 30 dB
|
||||
"""
|
||||
caget(blm + ":WS_PMT_ATT_VOLTS", 'i')
|
||||
return caget(blm + ":WS_PMT_ATT_VOLTS", 'i')
|
||||
|
||||
@@ -68,7 +68,16 @@ class WireScanInfo(DeviceBase):
|
||||
w2x = (pos_motor - self.home_offsets[2]) / -(math.sqrt(2))
|
||||
w2y = (pos_motor - self.home_offsets[3]) / (math.sqrt(2))
|
||||
return [w1x, w1y, w2x, w2y]
|
||||
|
||||
|
||||
def get_motor_pos(self, pos_wire, wire_type):
|
||||
if (pos_wire is None) or math.isnan(pos_wire):
|
||||
return pos_wire
|
||||
if wire_type == WireScanner.WireX1: return self.home_offsets[0] - pos_wire * math.sqrt(2)
|
||||
if wire_type == WireScanner.WireY1: return self.home_offsets[1] + pos_wire * math.sqrt(2)
|
||||
if wire_type == WireScanner.WireX2: return self.home_offsets[2] - pos_wire * math.sqrt(2)
|
||||
if wire_type == WireScanner.WireY2: return self.home_offsets[3] + pos_wire * math.sqrt(2)
|
||||
return None
|
||||
|
||||
def is_valid(self):
|
||||
return caget(self.prefix + ":VALID", 'i')==1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user