def first_mode_hop_time(self): """ Gets the date and time of the first mode hop :return: The datetime of the first mode hop for the specified laser :type: `datetime` """ # if the mode has not hopped, the device will respond with an empty # date string. This causes a problem with ctdate. if not self.mode_hop: raise RuntimeError("Mode hop not detected") response = self.parent.reference(self.name + ":charm:reg:first-mh") return ctdate(response)
def latest_mode_hop_time(self): """ Gets the date and time of the latest mode hop :return: The datetime of the latest mode hop for the specified laser :type: `datetime` """ # if the mode has not hopped, the device will respond with an empty # date string. This causes a problem with ctdate. if not self.mode_hop: raise RuntimeError("Mode hop not detected") response = self.parent.reference(self.name + ":charm:reg:latest-mh") return ctdate(response)
def lock_start(self): """ Gets the date and time of the start of mode-locking :return: The datetime of start of mode-locking for specified laser :type: `datetime` """ # if mode locking has not started yet, the device will respond with # an empty date string. This causes a problem with ctdate. _corr_stat = self.correction_status if _corr_stat == TopMode.CharmStatus.un_initialized \ or _corr_stat == TopMode.CharmStatus.failure: raise RuntimeError("Laser has not yet successfully locked") response = self.parent.reference(self.name + ":charm:reg:started") return ctdate(response)