def doInit(self, mode): MappedMoveable.doInit(self, mode) M = np.zeros([3, 3]) for i in range(3): for j in range(3): M[i, j] = (self.coils[j].orientation[i] / self.coils[j].calibrationcurrent) self._currentmatrix = M self._currentmatrix_inv = np.linalg.inv(M) self.alpha._callback = self._alphaCallBack
def doInit(self, mode): # check that an offset is defined for each z distance for _selpos, selpresets in self.presets.items(): for _pname, preset in selpresets.items(): if preset['z'] not in self.offsets: raise ConfigurationError( self, 'no detector offset found in configuration ' 'for detector distance of %.2f m' % preset['z']) MappedMoveable.doInit(self, mode) # apply mapping of last selector pos in case it changed if mode == MASTER: self._updateMapping(self.mapkey)
def doInit(self, mode): MappedMoveable.doInit(self, mode) for k, t in self.mapping.items(): if len(t) != len(self.devices): raise ConfigurationError(self, 'Switcher state entry for key ' '%r has different length than ' 'moveables list' % k) if self.precision: if len(self.precision) not in [1, len(self.devices)]: raise ConfigurationError(self, 'The precision list must either' ' contain only one element or have ' 'the same amount of elements as the ' 'moveables list')
def doInit(self, mode): if mode == SIMULATION: return if session.sessiontype != POLLER: choices = self._epics_wrapper.get_value_choices( self._get_pv_name('readpv'), self.epicstimeout) # Existing mapping is fixed, so must create and replace new_mapping = {} for i, choice in enumerate(choices): new_mapping[choice] = i self.mapping = new_mapping MappedMoveable.doInit(self, mode)
def doInit(self, mode): EpicsDigitalMoveableEss.doInit(self, mode) MappedMoveable.doInit(self, mode)
def doStatus(self, maxage=0): seq_status = SequencerMixin.doStatus(self, maxage) if seq_status[0] not in (status.OK, status.WARN): return seq_status return MappedMoveable.doStatus(self, maxage)
def doStart(self, pos): if self._attached_is_enabled.read(): return MappedMoveable.doStart(self, pos) raise MoveError(self, 'Device is disabled')