Exemplo n.º 1
0
 def setWavelength(self, nm: float):  # in nm, accuracy: 0.001 nm
     freq = nmToDGHz(nm)
     THz = freq // 10000
     dGHz = freq % 10000
     ITLA.ITLA(self, ITLA.REG_Fcf1, THz, ITLA.WRITE)
     ITLA.ITLA(self, ITLA.REG_Fcf2, dGHz, ITLA.WRITE)
     return
Exemplo n.º 2
0
 def fineTuning(self, pm: int):  # in pm, accuracy : 0.01 pm
     C = 299792458
     THz = ITLA.ITLA(self, ITLA.REG_Lf1, 0, ITLA.READ)
     dGHz = ITLA.ITLA(self, ITLA.REG_Lf2, 0, ITLA.READ)
     l1 = C / (THz + (dGHz * 10**(-4)))
     df = -1 * C * pm / (l1 * (l1 + pm))
     dfe = df * (10**(6))
     return ITLA.ITLA(self, ITLA.REG_Ftf, np.uint16(dfe), ITLA.WRITE)
Exemplo n.º 3
0
 def __init__(self, COMPort):
     super().__init__(port=COMPort,
                      baudrate=9600,
                      parity=serial.PARITY_NONE,
                      stopbits=serial.STOPBITS_ONE,
                      bytesize=serial.EIGHTBITS,
                      timeout=0.4)
     ITLA.ITLAConnect(COMPort)
     self.maximum_tuning = 199  # in pm
Exemplo n.º 4
0
 def setMode(self, ModeKey):
     ModeKeys = {'Dither': 0, 'Nodither': 1, 'Whisper': 2}
     Command = ModeKeys[ModeKey]
     return ITLA.ITLA(self, ITLA.REG_Mode, Command, ITLA.WRITE)
Exemplo n.º 5
0
 def setPower(self, Power):  # in 0.01 dB
     return ITLA.ITLA(self, ITLA.REG_Power, Power, ITLA.WRITE)
Exemplo n.º 6
0
 def setOff(self):
     return ITLA.ITLA(self, ITLA.REG_Resena, 0, ITLA.WRITE)
Exemplo n.º 7
0
 def setOn(self):
     return ITLA.ITLA(self, ITLA.REG_Resena, 8, ITLA.WRITE)