Skip to content

Expose stage travel limits through CMMCore #979

Description

@hinderling

Seems the stage device API has a travel-limits concept (MM::Stage::GetLimits, MM::XYStage::GetLimitsUm), but these are not exposed by MMCore. XY stage position is not a device property, so the usual hasPropertyLimits / getPropertyLowerLimit / getPropertyUpperLimit don't apply. MMCore already wraps the device methods internally (XYStageInstance::GetLimitsUm, StageInstance::GetLimits in mmcore::internal), they are just not reachable from CMMCore.

Proposal would be something like:
getXYStageLimits(* xyStageLabel, & xMin, & xMax, & yMin, & yMax)
getStageLimits(* stageLabel, & lower, & upper)

(similar to getGalvoXRange, getGalvoXMinimum, ...)

Ran into this working on a widget that shows the live stage position, where I wanted to draw the max stage range as an outline. I think it could also be a useful safety layer for programmatic control, e.g. validating acquisition events before starting an experiment.

A quick search shows several adapters return DEVICE_UNSUPPORTED_COMMAND (ASIStage, Ludl) or DEVICE_OK (OpenFlexure) for GetLimitsUm (case for GetLimits is similar), so clients would need an unambiguous way to deal with stages that don't implement limits. Maybe would require a hasXYStageLimits(label)?

Let me know if I'm missing something, and there is a way to do this already! Also happy to work towards a PR if this is something of interest.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions