poolpseudomotor

This module is part of the Python Pool library. It defines the PoolPseudoMotor class

Classes

PoolPseudoMotor

Inheritance diagram of PoolPseudoMotor
class PoolPseudoMotor(**kwargs)[source]

Bases: PoolBaseGroup, PoolElement

A class representing a Pseudo Motor in the Sardana Device Pool

on_change(evt_src, evt_type, evt_value)[source]
serialize(*args, **kwargs)[source]
set_drift_correction(drift_correction)[source]
get_drift_correction()[source]
property drift_correction

drift correction

get_action_cache()[source]

Returns the internal action cache object

set_action_cache(action_cache)[source]
get_siblings()[source]
property siblings

the siblings for this pseudo motor

on_element_changed(evt_src, evt_type, evt_value)[source]
add_user_element(element, index=None)[source]
calc_pseudo(physical_positions=None)[source]
calc_physical(new_position)[source]
calc_all_pseudo(physical_positions=None)[source]
get_position_attribute()[source]
get_low_level_physical_position_attribute_iterator()[source]
get_physical_position_attribute_iterator()[source]
get_physical_positions_attribute_sequence()[source]
get_physical_positions_attribute_map()[source]
get_physical_positions(cache=True, propagate=1)[source]

Get positions for underlying elements.

Parameters:
  • cache (bool) – if True (default) return value in cache, otherwise read value from hardware

  • propagate (int) – 0 for not propagating, 1 to propagate, 2 propagate with priority

Return type:

Dict[PoolElement, SardanaAttribute]

Returns:

the physical positions

get_siblings_positions(use=None, write_pos=True)[source]

Get the last positions for all siblings. If write_pos is True and a sibling has already been moved before, it’s last write position is used. Otherwise its read position is used instead.

Parameters:
  • use (Optional[Dict[PoolElement, SardanaValue]]) – the already calculated positions. If a sibling is in this dictionary, the position stored here is used instead

  • write_pos (bool) – determines if should try to use the last set point [default: True]

Return type:

Dict[PoolElement, float]

Returns:

a dictionary with siblings write positions

get_position(cache=True, propagate=1)[source]

Returns the user position.

Parameters:
  • cache (bool) – if True (default) return value in cache, otherwise read value from hardware

  • propagate (int) – 0 for not propagating, 1 to propagate, 2 propagate with priority

Return type:

SardanaAttribute

Returns:

the user position

set_position(position)[source]

Moves the motor to the specified user position

Parameters:

position (float) – the user position to move to

Return type:

None

set_write_position(w_position, timestamp=None, propagate=1)[source]

Sets a new write value for the user position.

Parameters:
  • w_position (float) – the new write value for user position

  • propagate (int) – 0 for not propagating, 1 to propagate, 2 propagate with priority

Return type:

None

property position: SardanaAttribute

pseudo motor position

calculate_state_info(status_info=None)[source]

Transforms the given state information. This specific base implementation transforms the given state,status tuple into a state, new_status tuple where new_status is “self.name is state plus the given status. It is assumed that the given status comes directly from the controller status information.

Parameters:

status_info – given status information [default: None, meaning use current state status.

Returns:

a transformed state information

read_state_info(state_info=None)[source]
get_default_attribute()[source]
get_motion()[source]
property motion

motion object

calculate_motion(new_position, items=None, calculated=None)[source]
start_move(new_position)[source]
stop()[source]
abort()[source]
get_operation()[source]