Taurus Extensions

Classes

BaseElement

Inheritance diagram of BaseElement
class BaseElement[source]

Bases: object

The base class for elements in the Pool (Pool itself, Motor, ControllerClass, ExpChannel all should inherit from this class directly or indirectly)

serialize()[source]
str(n=0)[source]

Returns a sequence of strings representing the object in ‘consistent’ way. Default is to return <name>, <controller name>, <axis>

Parameters:n – the number of elements in the tuple.
getName()[source]
getPoolObj()[source]

Get reference to this object’s Pool.

getPoolData()[source]

Get reference to this object’s Pool data.

Controller

Inheritance diagram of Controller
class Controller(name, **kw)[source]

Bases: sardana.taurus.core.tango.sardana.pool.PoolElement

Class encapsulating Controller functionality.

getModuleName()[source]
getClassName()[source]
getTypes()[source]
getMainType()[source]
addElement(elem)[source]
removeElement(elem)[source]
getElementByAxis(axis)[source]
getElementByName(name)[source]
getUsedAxes()[source]

Return axes in use by this controller

Returns:list of axes
Return type:list<int>
getUsedAxis()[source]
getLastUsedAxis()[source]

Return the last used axis (the highest axis) in this controller

Returns:last used axis
Return type:int or None

ControllerClass

Inheritance diagram of ControllerClass
class ControllerClass(**kw)[source]

Bases: sardana.taurus.core.tango.sardana.pool.BaseElement

getSimpleFileName()[source]
getFileName()[source]
getClassName()[source]
getType()[source]
getTypes()[source]
getLib()[source]
getGender()[source]
getModel()[source]
getOrganization()[source]

CTExpChannel

Inheritance diagram of CTExpChannel
class CTExpChannel(name, **kw)[source]

Bases: sardana.taurus.core.tango.sardana.pool.TimerableExpChannel

Class encapsulating CTExpChannel functionality.

ExpChannel

Inheritance diagram of ExpChannel
class ExpChannel(name, **kw)[source]

Bases: sardana.taurus.core.tango.sardana.pool.PoolElement

Class encapsulating ExpChannel functionality.

isReferable()[source]
getIntegrationTime()[source]
getIntegrationTimeObj()[source]
setIntegrationTime(integ_time)[source]
putIntegrationTime(integ_time)[source]
getValueObj_()[source]

Retrurns Value attribute event generator object.

Returns:Value attribute event generator
Return type:TangoAttributeEG

..todo:: When support to Taurus 3 will be dropped provide getValueObj. Taurus 3 TaurusDevice class already uses this name.

getValue(force=False)[source]
getValueBufferObj()[source]
getValueBuffer()[source]
valueBufferChanged(value_buffer)[source]
getValueRefObj()[source]

Return ValueRef attribute event generator object.

Returns:ValueRef attribute event generator
Return type:TangoAttributeEG
getValueRef(force=False)[source]
getValueRefBufferObj()[source]
getValueRefBuffer()[source]
valueBufferRefChanged(value_ref_buffer)[source]
getValueRefPattern()[source]
getValueRefPatternObj()[source]
setValueRefPattern(value_ref_pattern)[source]
putValueRefPattern(value_ref_pattern)[source]
isValueRefEnabled()[source]
getValueRefEnabledObj()[source]
setValueRefEnabled(value_ref_enabled)[source]
putValueRefEnabled(value_ref_enabled)[source]
go(*args, **kwargs)[source]

Count and report count result.

Configuration measurement, then start and wait until finish.

Note

The count (go) method API is partially experimental (value references may be changed to values whenever possible in the future). Backwards incompatible changes may occur if deemed necessary by the core developers.

Returns:state and value (or value reference - experimental)
Return type:tuple
startCount(**kwargs)
waitCount(timeout=None, id=None)

Wait for the operation to finish

Parameters:
  • timeout (float) – optional timeout (seconds)
  • id (tuple(float)) – id of the opertation returned by start
count(*args, **kwargs)

Count and report count result.

Configuration measurement, then start and wait until finish.

Note

The count (go) method API is partially experimental (value references may be changed to values whenever possible in the future). Backwards incompatible changes may occur if deemed necessary by the core developers.

Returns:state and value (or value reference - experimental)
Return type:tuple
stopCount(wait_ready=True, timeout=None)
stop(wait_ready=True, timeout=None)

Instrument

Inheritance diagram of Instrument
class Instrument(**kw)[source]

Bases: sardana.taurus.core.tango.sardana.pool.BaseElement

getFullName()[source]
getParentInstrument()[source]
getParentInstrumentName()[source]
getChildrenInstruments()[source]
getElements()[source]
getType()[source]

IORegister

Inheritance diagram of IORegister
class IORegister(name, **kw)[source]

Bases: sardana.taurus.core.tango.sardana.pool.PoolElement

Class encapsulating IORegister functionality.

getValueObj()[source]
Deprecated by TEP14.
..warning::
this bck-compat implementation is not perfect because the rvalue of the returned TangoAttributeValue is now a member of TaurusDevState instead of TaurusSWDevState

Deprecated since version 4.0: Use state [agnostic] or stateObj.read [Tango] instead

readValue(force=False)[source]
startWriteValue(new_value, timeout=None)[source]
waitWriteValue(timeout=None)[source]
writeValue(new_value, timeout=None)[source]
writeIORegister(new_value, timeout=None)
writeIOR(new_value, timeout=None)
readIORegister(force=False)
readIOR(force=False)
getValue(force=False)

MeasurementGroup

Inheritance diagram of MeasurementGroup
class MeasurementGroup(name, **kw)[source]

Bases: sardana.taurus.core.tango.sardana.pool.PoolElement

Class encapsulating MeasurementGroup functionality.

cleanUp()[source]

The cleanUp. Default implementation does nothing Overwrite when necessary

getConfigurationAttrEG()[source]
setConfiguration(configuration)[source]
getConfiguration(force=False)[source]
on_configuration_changed(evt_src, evt_type, evt_value)[source]
getTimerName()[source]
getTimer()[source]
getTimerValue()[source]
getMonitorName()[source]
getMonitor()[source]
setTimer(timer_name)[source]
getChannels()[source]
getCounters()[source]
getChannelNames()[source]
getCounterNames()[source]
getChannelLabels()[source]
getCounterLabels()[source]
getChannel(name)[source]
getChannelInfo(name)[source]
getChannelsInfo()[source]
getChannelsEnabledInfo()[source]

Returns information about only enabled channels present in the measurement group in a form of ordered, based on the channel index, list.

Returns:list with channels info
Return type:list<TangoChannelInfo>
getCountersInfo()[source]
getValues(parallel=True)[source]
getValueBuffers()[source]
getIntegrationTime()[source]
getIntegrationTimeObj()[source]
setIntegrationTime(ctime)[source]
putIntegrationTime(ctime)[source]
getAcquisitionModeObj()[source]
getAcquisitionMode()[source]
setAcquisitionMode(acqMode)[source]
getSynchronizationObj()[source]
getSynchronization()[source]
setSynchronization(synchronization)[source]
getNbStartsObj()[source]
setNbStarts(starts)[source]
getNbStarts()[source]
getMoveableObj()[source]
getMoveable()[source]
getLatencyTimeObj()[source]
getLatencyTime()[source]
setMoveable(moveable=None)[source]
valueBufferChanged(channel, value_buffer)[source]

Receive value buffer updates, pre-process them, and call the subscribed callback.

Parameters:
  • channel (ExpChannel) – channel that reports value buffer update
  • value_buffer (str) – json encoded value buffer update, it contains at least values and indexes
subscribeValueBuffer(cb=None)[source]

Subscribe to channels’ value buffer update events. If no callback is passed, the default channel’s callback is subscribed which will store the data in the channel’s value_buffer attribute.

Parameters:cb (callable) – callback to be subscribed, None means subscribe the default channel’s callback
unsubscribeValueBuffer(cb=None)[source]

Unsubscribe from channels’ value buffer events. If no callback is passed, unsubscribe the channel’s default callback.

Parameters:cb (callable) – callback to be unsubscribed, None means unsubscribe the default channel’s callback
valueRefBufferChanged(channel, value_ref_buffer)[source]

Receive value ref buffer updates, pre-process them, and call the subscribed callback.

Parameters:
  • channel (ExpChannel) – channel that reports value ref buffer update
  • value_ref_buffer (str) – json encoded value ref buffer update, it contains at least value refs and indexes
subscribeValueRefBuffer(cb=None)[source]

Subscribe to channels’ value ref buffer update events. If no callback is passed, the default channel’s callback is subscribed which will store the data in the channel’s value_buffer attribute.

Parameters:cb (callable) – callback to be subscribed, None means subscribe the default channel’s callback
unsubscribeValueRefBuffer(cb=None)[source]

Unsubscribe from channels’ value ref buffer events. If no callback is passed, unsubscribe the channel’s default callback.

Parameters:cb (callable) – callback to be unsubscribed, None means unsubscribe the default channel’s callback
enableChannels(channels)[source]

Enable acquisition of the indicated channels.

Parameters:channels – (seq<str>) a sequence of strings indicating channel names
disableChannels(channels)[source]

Disable acquisition of the indicated channels.

Parameters:channels – (seq<str>) a sequence of strings indicating channel names
prepare()[source]
count_raw(start_time=None)[source]

Raw count and report count values.

Simply start and wait until finish, no configuration nor preparation.

Note

The count_raw method API is partially experimental (value references may be changed to values whenever possible in the future). Backwards incompatible changes may occur if deemed necessary by the core developers.

Parameters:start_time (float) – start time of the whole count operation, if not passed a current timestamp will be used
Returns:channel names and values (or value references - experimental)
Return type:dict where keys are channel full names and values are channel values (or value references - experimental)
go(*args, **kwargs)[source]

Count and report count values.

Configuration and prepare for measurement, then start and wait until finish.

Note

The count (go) method API is partially experimental (value references may be changed to values whenever possible in the future). Backwards incompatible changes may occur if deemed necessary by the core developers.

Returns:channel names and values (or value references - experimental)
Return type:dict where keys are channel full names and values are channel values (or value references - experimental)
count_continuous(synchronization, value_buffer_cb=None)[source]

Execute measurement process according to the given synchronization description.

Parameters:
  • synchronization (list of groups with equidistant synchronizations) – synchronization description
  • value_buffer_cb (callable) – callback on value buffer updates
Returns:

state and eventually value buffers if no callback was passed

Return type:

tuple<list<DevState>,<list>>

Todo

Think of unifying measure with count.

Note

The measure method has been included in MeasurementGroup class on a provisional basis. Backwards incompatible changes (up to and including removal of the method) may occur if deemed necessary by the core developers.

startCount(**kwargs)
waitCount(timeout=None, id=None)

Wait for the operation to finish

Parameters:
  • timeout (float) – optional timeout (seconds)
  • id (tuple(float)) – id of the opertation returned by start
count(*args, **kwargs)

Count and report count values.

Configuration and prepare for measurement, then start and wait until finish.

Note

The count (go) method API is partially experimental (value references may be changed to values whenever possible in the future). Backwards incompatible changes may occur if deemed necessary by the core developers.

Returns:channel names and values (or value references - experimental)
Return type:dict where keys are channel full names and values are channel values (or value references - experimental)
stopCount(wait_ready=True, timeout=None)
stop(wait_ready=True, timeout=None)

Motor

Inheritance diagram of Motor
class Motor(name, **kw)[source]

Bases: sardana.taurus.core.tango.sardana.pool.PoolElement, sardana.taurus.core.tango.sardana.motion.Moveable

Class encapsulating Motor functionality.

getPosition(force=False)[source]
getDialPosition(force=False)[source]
getVelocity(force=False)[source]
getAcceleration(force=False)[source]
getDeceleration(force=False)[source]
getBaseRate(force=False)[source]
getBacklash(force=False)[source]
getLimitSwitches(force=False)[source]
getOffset(force=False)[source]
getStepPerUnit(force=False)[source]
getSign(force=False)[source]
getSimulationMode(force=False)[source]
getPositionObj()[source]
getDialPositionObj()[source]
getVelocityObj()[source]
getAccelerationObj()[source]
getDecelerationObj()[source]
getBaseRateObj()[source]
getBacklashObj()[source]
getLimitSwitchesObj()[source]
getOffsetObj()[source]
getStepPerUnitObj()[source]
getSimulationModeObj()[source]
setVelocity(value)[source]
setAcceleration(value)[source]
setDeceleration(value)[source]
setBaseRate(value)[source]
setBacklash(value)[source]
setOffset(value)[source]
setStepPerUnit(value)[source]
setSign(value)[source]
go(*args, **kwargs)[source]
startMove(**kwargs)
waitMove(timeout=None, id=None)

Wait for the operation to finish

Parameters:
  • timeout (float) – optional timeout (seconds)
  • id (tuple(float)) – id of the opertation returned by start
move(*args, **kwargs)
getLastMotionTime()

Returns the time it took for last go operation

getTotalLastMotionTime()

Returns the time it took for last go operation, including dead time to prepare, wait for events, etc

iterMove(**kwargs)[source]
readPosition(force=False)[source]
getMoveableSource()[source]
getSize()[source]
getIndex(name)[source]

MotorGroup

Inheritance diagram of MotorGroup
class MotorGroup(name, **kw)[source]

Bases: sardana.taurus.core.tango.sardana.pool.PoolElement, sardana.taurus.core.tango.sardana.motion.Moveable

Class encapsulating MotorGroup functionality.

getMotorNames()[source]
hasMotor(name)[source]
getPosition(force=False)[source]
getPositionObj()[source]
go(*args, **kwargs)[source]
startMove(**kwargs)
waitMove(timeout=None, id=None)

Wait for the operation to finish

Parameters:
  • timeout (float) – optional timeout (seconds)
  • id (tuple(float)) – id of the opertation returned by start
move(*args, **kwargs)
getLastMotionTime()

Returns the time it took for last go operation

getTotalLastMotionTime()

Returns the time it took for last go operation, including dead time to prepare, wait for events, etc

readPosition(force=False)[source]
getMoveableSource()[source]
getSize()[source]
getIndex(name)[source]

OneDExpChannel

Inheritance diagram of OneDExpChannel
class OneDExpChannel(name, **kw)[source]

Bases: sardana.taurus.core.tango.sardana.pool.TimerableExpChannel

Class encapsulating OneDExpChannel functionality.

Pool

Inheritance diagram of Pool
class Pool(name, **kw)[source]

Bases: taurus.core.tango.tangodevice.TangoDevice, sardana.taurus.core.tango.sardana.motion.MoveableSource

Class encapsulating device Pool functionality.

cleanUp()[source]

The cleanUp. Default implementation does nothing Overwrite when necessary

getObject(element_info)[source]
on_elements_changed(evt_src, evt_type, evt_value)[source]
getElementsInfo()[source]
getElements()[source]
getElementInfo(name)[source]
getElementNamesOfType(elem_type)[source]
getElementsOfType(elem_type)[source]
getElementsWithInterface(interface)[source]
getElementWithInterface(elem_name, interface)[source]
getObj(name, elem_type=None)[source]
getMoveable(seq<string> names) → Moveable[source]

Returns a moveable object that handles all the moveable items given in names.

createMotorGroup(mg_name, elements)[source]
createMeasurementGroup(mg_name, elements)[source]
deleteMeasurementGroup(name)[source]
createElement(name, ctrl, axis=None)[source]
renameElement(old_name, new_name)[source]
deleteElement(name)[source]
createController(class_name, name, *props)[source]
deleteController(name)[source]

PoolElement

Inheritance diagram of PoolElement
class PoolElement(name, **kwargs)[source]

Bases: sardana.taurus.core.tango.sardana.pool.BaseElement, taurus.core.tango.tangodevice.TangoDevice

Base class for a Pool element device.

getPoolObj()[source]

Get reference to this object’s Pool.

getPoolData()[source]

Get reference to this object’s Pool data.

cleanUp()[source]

The cleanUp. Default implementation does nothing Overwrite when necessary

reserve(obj)[source]
unreserve()[source]
isReserved(obj=None)[source]
getReservedWR()[source]
getReserved()[source]
dump_attributes()[source]
getStateEG()[source]
getControllerName()[source]
getControllerObj()[source]
getAxis()[source]
getType()[source]
waitReady(timeout=None)[source]
getAttrEG(name)[source]

Returns the TangoAttributeEG object

getAttrObj(name)[source]

Returns the taurus.core.tangoattribute.TangoAttribute object

getInstrumentObj()[source]
getInstrumentName(force=False)[source]
getInstrument()[source]
start(**kwargs)[source]
waitFinish(timeout=None, id=None)[source]

Wait for the operation to finish

Parameters:
  • timeout (float) – optional timeout (seconds)
  • id (tuple(float)) – id of the opertation returned by start
go(**kwargs)[source]
getLastGoTime()[source]

Returns the time it took for last go operation

getTotalLastGoTime()[source]

Returns the time it took for last go operation, including dead time to prepare, wait for events, etc

abort(wait_ready=True, timeout=None)[source]
stop(wait_ready=True, timeout=None)[source]
information(tab=' ')[source]

PseudoCounter

Inheritance diagram of PseudoCounter
class PseudoCounter(name, **kw)[source]

Bases: sardana.taurus.core.tango.sardana.pool.ExpChannel

Class encapsulating PseudoCounter functionality.

PseudoMotor

Inheritance diagram of PseudoMotor
class PseudoMotor(name, **kw)[source]

Bases: sardana.taurus.core.tango.sardana.pool.PoolElement, sardana.taurus.core.tango.sardana.motion.Moveable

Class encapsulating PseudoMotor functionality.

getPosition(force=False)[source]
getDialPosition(force=False)[source]
getPositionObj()[source]
getDialPositionObj()[source]
go(*args, **kwargs)[source]
startMove(**kwargs)
waitMove(timeout=None, id=None)

Wait for the operation to finish

Parameters:
  • timeout (float) – optional timeout (seconds)
  • id (tuple(float)) – id of the opertation returned by start
move(*args, **kwargs)
getLastMotionTime()

Returns the time it took for last go operation

getTotalLastMotionTime()

Returns the time it took for last go operation, including dead time to prepare, wait for events, etc

readPosition(force=False)[source]
getMoveableSource()[source]
getSize()[source]
getIndex(name)[source]

TriggerGate

Inheritance diagram of TriggerGate
class TriggerGate(name, **kwargs)[source]

Bases: sardana.taurus.core.tango.sardana.pool.PoolElement

Class encapsulating TriggerGate functionality.

TwoDExpChannel

Inheritance diagram of TwoDExpChannel
class TwoDExpChannel(name, **kw)[source]

Bases: sardana.taurus.core.tango.sardana.pool.TimerableExpChannel

Class encapsulating TwoDExpChannel functionality.

ZeroDExpChannel

Inheritance diagram of ZeroDExpChannel
class ZeroDExpChannel(name, **kw)[source]

Bases: sardana.taurus.core.tango.sardana.pool.ExpChannel

Class encapsulating ZeroDExpChannel functionality.