@@ -1396,7 +1396,7 @@ class Stage(Device, metaclass=abc.ABCMeta):
13961396 .. code-block:: python
13971397
13981398 stage = SomeStageDevice()
1399- stage.enable() # may trigger a stage move
1399+ stage.enable() # may trigger a stage move
14001400
14011401 # move operations
14021402 stage.move_to({'x': 42.0, 'y': -5.1})
@@ -1447,7 +1447,7 @@ class documentation for hardware specific details.
14471447
14481448 Some stages need to find a reference position, home, before being
14491449 able to be moved. If required, this happens automatically during
1450- :func:`enable`.
1450+ :func:`enable` (see also :func:`may_move_on_enable`) .
14511451 """
14521452
14531453 @property
@@ -1468,27 +1468,34 @@ def axes(self) -> typing.Mapping[str, StageAxis]:
14681468 """
14691469 raise NotImplementedError ()
14701470
1471- @property
1472- def need_homed (self ) -> bool :
1473- """Boolean flag to say if the stage needs to be homed. Many stages
1474- need to be driven to their limts at startup to find a repeatable zero
1475- position and sometimes to find their limits as well.
1476-
1477- By default this function returns "False". If the stage needs
1478- to be homed then this function should be overwritten to return
1479- "True" until the homing operation has been performed.
1480- Additionaly a stage that needs to be homed should implement a
1481- home() fucntion that performs the home move, sets limits and
1482- leaves the stage somewhere sensible. This function should
1483- also set the need_homed propety to False.
1484-
1485- Stages that dont need homing can leave this default function
1486- and dont need to implment the home() function.
1471+
1472+ @abc .abstractmethod
1473+ def may_move_on_enable (self ) -> bool :
1474+ """Whether calling :func:`enable` is likely to make the stage move.
1475+
1476+ Most stages need to be driven to their limits at startup to
1477+ find a repeatable zero position and sometimes to find their
1478+ limits as well. This is typically called "homing".
1479+
1480+ Stages that need to "home" differ on how often they need it
1481+ but they only do it during :func:`enable`. They may need to
1482+ move each time `enable` is called, the first time after the
1483+ `Stage` object has been created, or even only the first time
1484+ since the device was powered up.
1485+
1486+ Note the "*may*" on "may_move_on_enable". This is because it
1487+ can be difficult to know for certain if `enable` will cause
1488+ the stage to home. Still, knowing that the stage *may* move
1489+ is essential for safety. An unexpected movement of the stage,
1490+ particularly large movements such as moving to the stage
1491+ limits, can destroy a sample on the stage --- or even worse,
1492+ it can damage an objective or the stage itself. When in
1493+ doubt, implementations should return `True`.
14871494
14881495 """
1489- return False
1496+ raise NotImplementedError ()
1497+
14901498
1491-
14921499 @property
14931500 def position (self ) -> typing .Mapping [str , float ]:
14941501 """Map of axis name to their current position.
0 commit comments