useq.v2
¶
New MDASequence API (preview).
useq.v2 is the next version of the useq-schema API. Several of its classes share
names with the current ones but are different classes: for example,
useq.v2.MDASequence is not useq.MDASequence. See useq-schema v2
(preview) for what's different.
Classes
| Name | Description |
|---|---|
AutoFocusTransform |
Insert hardware-autofocus events created by an AutoFocusPlan. |
AxisIterable |
|
ChannelsPlan |
|
EventBuilder |
Callable that builds an event from an AxesIndex. |
EventTransform |
Callable that can modify, drop, or insert events. |
GridFromEdges |
Yield absolute stage positions to cover a bounded area. |
GridFromPolygon |
Grid plan based on a polygon boundary. |
GridRowsColumns |
Grid plan based on number of rows and columns. |
GridWidthHeight |
Grid plan based on total width and height. |
KeepShutterOpenTransform |
Replicates the v1 keep_shutter_open_across behaviour. |
MDASequence |
|
MultiAxisSequence |
Represents a multidimensional sequence. |
MultiPhaseTimePlan |
Time sequence composed of multiple phases. |
MultiPositionPlan |
Base class for all multi-position plans. |
Position |
Define a position in 3D space. |
RandomPoints |
Yield random points in a specified geometric shape. |
RelativeTo |
Where the coordinates of the grid are relative to. |
ResetEventTimerTransform |
Marks the first frame of each timepoint with reset_event_timer=True. |
SimpleValueAxis |
A basic axis implementation that yields values directly. |
StagePositions |
|
TDurationLoops |
Define temporal sequence using duration and number of loops. |
TIntervalDuration |
Define temporal sequence using interval and duration. |
TIntervalLoops |
Define temporal sequence using interval and number of loops. |
TimePlan |
|
ZAboveBelow |
Define Z as asymmetric range above and below some reference position. |
ZAbsolutePositions |
Define Z as a list of absolute positions. |
ZPlan |
Base class for Z-axis plans in v2 MDA sequences. |
ZRangeAround |
Define Z as a symmetric range around some reference position. |
ZRelativePositions |
Define Z as a list of positions relative to some reference. |
ZTopBottom |
Define Z using absolute top & bottom positions. |
Functions
| Name | Description |
|---|---|
RelativePosition |
Create a relative position. |
iterate_multi_dim_sequence |
Iterate over a MultiDimSequence. |
Attributes
| Name | Description |
|---|---|
AbsolutePosition |
|
AnyTimePlan |
|
AnyZPlan |
|
MultiPointPlan |
|
RelativeMultiPointPlan |
|
SinglePhaseTimePlan |
Classes¶
RelativeTo
¶
Bases: Enum
Where the coordinates of the grid are relative to.
Attributes:
| Name | Type | Description |
|---|---|---|
center |
Literal['center']
|
Grid is centered around the origin. |
top_left |
Literal['top_left']
|
Grid is positioned such that the top left corner is at the origin. |
useq.v2.RelativeTo.center
¶
AxisIterable
¶
Attributes:
| Name | Type | Description |
|---|---|---|
axis_key |
str
|
A string id representing the axis. |
-
API Reference
useq-schema
useqv2 Classes
-
API Reference
useq-schema
useqv2 Classes
-
API Reference
useq-schema
useqv2 ClassesMDASequence
useq.v2.AxisIterable.should_skip
¶
should_skip(prefix: AxesIndex) -> bool
Return True if this axis wants to skip the combination.
Default implementation returns False.
useq.v2.AxisIterable.contribute_to_mda_event
¶
Contribute data to the event being built.
This method allows each axis to contribute its data to the final MDAEvent. The default implementation does nothing - subclasses should override to add their specific contributions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
V
|
The value provided by this axis, for this iteration. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
event_data |
dict[str, Any]
|
Data to be added to the MDAEvent, it is ultimately up to the EventBuilder to decide how to merge possibly conflicting contributions from different axes. |
EventBuilder
¶
Bases: Protocol[EventTco]
Callable that builds an event from an AxesIndex.
-
API Reference
useq-schema
useqv2 ClassesMDASequence
EventTransform
¶
Bases: Protocol[EventT]
Callable that can modify, drop, or insert events.
The transformer receives:
- event - the current (already built) event.
- prev_event - the previously transformed event that was just yielded,
or
Noneif this is the first call. - make_next_event - a zero-argument callable that lazily builds the next raw event (i.e. before any transformers). Only call it if you really need look-ahead so the pipeline stays lazy.
The transformer must return a list.
Return one event in the list for a 1-to-1 mapping, an empty list to drop the original event, or a list with multiple items to insert extras.
-
API Reference
useq-schema
useqv2 Classes
-
API Reference
useq-schema
useqv2 Classes
-
API Reference
useq-schema
useqv2 ClassesMDASequence
MultiAxisSequence
¶
Bases: MutableModel, Generic[EventTco]
Represents a multidimensional sequence.
At the top level the value field is ignored.
When used as a nested override, value is the value for that branch and
its axes are iterated using its own axis_order if provided;
otherwise, it inherits the parent's axis_order.
Attributes:
| Name | Type | Description |
|---|---|---|
axes |
tuple[AxisIterable, ...]
|
|
axis_order |
tuple[str, ...] | None
|
|
value |
Any
|
|
event_builder |
EventBuilder[EventTco] | None
|
|
transforms |
tuple[EventTransform, ...]
|
|
-
API Reference
useq-schema
useqv2 ClassesMDASequence
useq.v2.MultiAxisSequence.event_builder
¶
event_builder: Annotated[EventBuilder[EventTco], ImportableObject()] | None = (
Field(default=None, repr=False)
)
useq.v2.MultiAxisSequence.transforms
¶
transforms: tuple[Annotated[EventTransform, ImportableObject()], ...] = Field(
default_factory=tuple, repr=False
)
useq.v2.MultiAxisSequence.is_finite
¶
is_finite() -> bool
Return True if the sequence is finite (all axes are Sized).
useq.v2.MultiAxisSequence.iter_axes
¶
Iterate over the axes and yield combinations with context.
Yields:
| Type | Description |
|---|---|
AxesIndexWithContext
|
A tuple of (AxesIndex, MultiAxisSequence) where AxesIndex is a dictionary
mapping axis keys to tuples of (index, value, AxisIterable), and
MultiAxisSequence is the context that generated this axes combination.
For example, when iterating over an |
useq.v2.MultiAxisSequence.iter_events
¶
Iterate over axes, build raw events, then apply transformers.
useq.v2.MultiAxisSequence.compose_transforms
¶
compose_transforms(
context: tuple[MultiAxisSequence, ...] = (),
) -> tuple[EventTransform, ...]
Compose transforms from the context of nested sequences.
The base implementation aggregates transforms from outer to inner sequences. Only a single instance of each transform type is kept, so if multiple sequences in the context have the same transform type, only one will be used, and innermost MultiAxisSequence's transform will take precedence.
SimpleValueAxis
¶
Bases: AxisIterable[V]
A basic axis implementation that yields values directly.
If a value needs to declare sub-axes, yield a nested MultiAxisSequence. The default should_skip always returns False.
Attributes:
| Name | Type | Description |
|---|---|---|
axis_key |
str
|
A string id representing the axis. |
values |
list[V]
|
|
-
API Reference
useq-schema
useqv2 ClassesChannelsPlan
ChannelsPlan
¶
Bases: SimpleValueAxis[Channel], FrozenModel
Attributes:
| Name | Type | Description |
|---|---|---|
axis_key |
Literal[<Axis.CHANNEL: 'c'>]
|
A string id representing the axis. |
values |
list[Channel]
|
|
GridFromEdges
¶
Yield absolute stage positions to cover a bounded area.
The bounded area is defined by top, left, bottom and right edges in stage coordinates. The bounds define the outer edges of the images, including the field of view and overlap.
Attributes:
| Name | Type | Description |
|---|---|---|
top |
float
|
Top stage position of the bounding area |
left |
float
|
Left stage position of the bounding area |
bottom |
float
|
Bottom stage position of the bounding area |
right |
float
|
Right stage position of the bounding area |
overlap |
tuple[float, float]
|
Overlap between grid positions in percent. If a single value is provided, it is used for both x and y. If a tuple is provided, the first value is used for x and the second for y. |
mode |
OrderMode
|
Define the ways of ordering the grid positions. Options are row_wise, column_wise, row_wise_snake, column_wise_snake and spiral. By default, row_wise_snake. |
fov_width |
float | None
|
Width of the field of view in microns. If not provided, acquisition engines should use current width of the FOV based on the current objective and camera. Engines MAY override this even if provided. |
fov_height |
float | None
|
Height of the field of view in microns. If not provided, acquisition engines should use current height of the FOV based on the current objective and camera. Engines MAY override this even if provided. |
axis_key |
Literal[<Axis.GRID: 'g'>]
|
A string id representing the axis. |
GridFromPolygon
¶
Grid plan based on a polygon boundary.
This grid plan generates absolute stage positions that cover a polygon region. Additionally the convex hull, and/or a buffered polygon can be created to generate tiles over a larger area surrounding the initial polygon.
Attributes:
| Name | Type | Description |
|---|---|---|
vertices |
list[tuple[float, float]]
|
List of (x, y) points that define the polygon boundary. Must have at least 3 points. |
convex_hull |
bool | None
|
If True, the convex hull of the polygon will be used. |
offset |
float | None
|
Expand area bounded by vertices to include all points within a |
overlap |
tuple[float, float]
|
Overlap between grid positions in percent. If a single value is provided, it is used for both x and y. If a tuple is provided, the first value is used for x and the second for y. |
mode |
OrderMode
|
Define the ways of ordering the grid positions. Options are row_wise, column_wise, row_wise_snake, column_wise_snake and spiral. By default, row_wise_snake. |
fov_width |
float | None
|
Width of the field of view in microns. If not provided, acquisition engines should use current width of the FOV based on the current objective and camera. Engines MAY override this even if provided. |
fov_height |
float | None
|
Height of the field of view in microns. If not provided, acquisition engines should use current height of the FOV based on the current objective and camera. Engines MAY override this even if provided. |
axis_key |
Literal[<Axis.GRID: 'g'>]
|
A string id representing the axis. |
useq.v2.GridFromPolygon.vertices
¶
vertices: Annotated[
list[tuple[float, float]],
Field(
...,
min_length=3,
description="List of vertices that define the polygon, must have at least 3 vertices.",
frozen=True,
),
]
useq.v2.GridFromPolygon.convex_hull
¶
convex_hull: Annotated[
bool | None,
Field(
False,
description="If True, the convex hull of the polygon will be used.",
),
] = False
useq.v2.GridFromPolygon.offset
¶
offset: Annotated[
float | None,
Field(
None,
frozen=True,
description="Offsets the polygon in all directions to improve tile coverage.",
),
] = None
useq.v2.GridFromPolygon.poly
property
¶
Return the processed polygon vertices as a shapely Polygon.
useq.v2.GridFromPolygon.prepared_poly
property
¶
Return the prepared polygon for faster intersection tests.
useq.v2.GridFromPolygon.validate_vertices
¶
GridRowsColumns
¶
Grid plan based on number of rows and columns.
Attributes:
| Name | Type | Description |
|---|---|---|
rows |
int
|
Number of rows. |
columns |
int
|
Number of columns. |
relative_to |
RelativeTo
|
Point in the grid to which the coordinates are relative. If "center", the grid is centered around the origin. If "top_left", the grid is positioned such that the top left corner is at the origin. |
overlap |
tuple[float, float]
|
Overlap between grid positions in percent. If a single value is provided, it is used for both x and y. If a tuple is provided, the first value is used for x and the second for y. |
mode |
OrderMode
|
Define the ways of ordering the grid positions. Options are row_wise, column_wise, row_wise_snake, column_wise_snake and spiral. By default, row_wise_snake. |
fov_width |
float | None
|
Width of the field of view in microns. If not provided, acquisition engines should use current width of the FOV based on the current objective and camera. Engines MAY override this even if provided. |
fov_height |
float | None
|
Height of the field of view in microns. If not provided, acquisition engines should use current height of the FOV based on the current objective and camera. Engines MAY override this even if provided. |
axis_key |
Literal[<Axis.GRID: 'g'>]
|
A string id representing the axis. |
-
API Reference
useq-schema
useqv2 AttributesRelativeMultiPointPlan
GridWidthHeight
¶
Grid plan based on total width and height.
Attributes:
| Name | Type | Description |
|---|---|---|
width |
float
|
Minimum total width of the grid, in microns. (may be larger based on fov_width) |
height |
float
|
Minimum total height of the grid, in microns. (may be larger based on fov_height) |
relative_to |
RelativeTo
|
Point in the grid to which the coordinates are relative. If "center", the grid is centered around the origin. If "top_left", the grid is positioned such that the top left corner is at the origin. |
overlap |
tuple[float, float]
|
Overlap between grid positions in percent. If a single value is provided, it is used for both x and y. If a tuple is provided, the first value is used for x and the second for y. |
mode |
OrderMode
|
Define the ways of ordering the grid positions. Options are row_wise, column_wise, row_wise_snake, column_wise_snake and spiral. By default, row_wise_snake. |
fov_width |
float | None
|
Width of the field of view in microns. If not provided, acquisition engines should use current width of the FOV based on the current objective and camera. Engines MAY override this even if provided. |
fov_height |
float | None
|
Height of the field of view in microns. If not provided, acquisition engines should use current height of the FOV based on the current objective and camera. Engines MAY override this even if provided. |
axis_key |
Literal[<Axis.GRID: 'g'>]
|
A string id representing the axis. |
-
API Reference
useq-schema
useqv2 AttributesRelativeMultiPointPlan
RandomPoints
¶
Bases: MultiPositionPlan
Yield random points in a specified geometric shape.
Attributes:
| Name | Type | Description |
|---|---|---|
num_points |
int
|
Number of points to generate. |
max_width |
float
|
Maximum width of the bounding box in microns. |
max_height |
float
|
Maximum height of the bounding box in microns. |
shape |
Shape
|
Shape of the bounding box. Current options are "ellipse" and "rectangle". |
random_seed |
int | None
|
Random numpy seed that should be used to generate the points. If None, a random seed will be used. |
allow_overlap |
bool
|
By default, True. If False and |
order |
TraversalOrder | None
|
Order in which the points will be visited. If None, order is simply the order in which the points are generated (random). Use 'nearest_neighbor' or 'two_opt' to order the points in a more structured way. |
start_at |
Position | int
|
Position or index of the point to start at. This is only used if |
axis_key |
Literal[<Axis.GRID: 'g'>]
|
A string id representing the axis. |
fov_width |
float | None
|
|
fov_height |
float | None
|
|
-
API Reference
useq-schema
useqv2 AttributesRelativeMultiPointPlan
useq.v2.RandomPoints.axis_key
¶
MDASequence
¶
MDASequence(
*,
axis_order: tuple[str, ...] | str | None = ...,
value: Any = ...,
time_plan: AxisIterable[float] | list | dict | None = ...,
z_plan: AxisIterable[Position] | None = ...,
channels: AxisIterable[Channel] | list | None = ...,
stage_positions: AxisIterable[Position] | list | None = ...,
grid_plan: AxisIterable[Position] | None = ...,
autofocus_plan: AnyAutofocusPlan | None = ...,
keep_shutter_open_across: str | tuple[str, ...] = ...,
metadata: dict[str, Any] = ...,
event_builder: EventBuilder[MDAEvent] = ...,
transforms: tuple[EventTransform[MDAEvent], ...] = ...,
)
MDASequence(
*,
axes: tuple[AxisIterable, ...] = ...,
axis_order: tuple[str, ...] | None = ...,
value: Any = ...,
autofocus_plan: AnyAutofocusPlan | None = ...,
keep_shutter_open_across: tuple[str, ...] = ...,
metadata: dict[str, Any] = ...,
event_builder: EventBuilder[MDAEvent] = ...,
transforms: tuple[EventTransform[MDAEvent], ...] = ...,
)
MDASequence(**kwargs: Any)
Bases: MultiAxisSequence[MDAEvent]
Attributes:
| Name | Type | Description |
|---|---|---|
axes |
tuple[AxisIterable, ...]
|
|
axis_order |
tuple[str, ...] | None
|
|
value |
Any
|
|
event_builder |
EventBuilder[MDAEvent] | None
|
Builds MDAEvent objects from AxesIndex. |
transforms |
tuple[EventTransform[MDAEvent], ...]
|
|
autofocus_plan |
AxesBasedAF | None
|
|
keep_shutter_open_across |
tuple[str, ...]
|
|
metadata |
dict[str, Any]
|
|
-
API Reference
useq-schema
useqv2 ClassesStagePositionsvalues
useq.v2.MDASequence.keep_shutter_open_across
¶
useq.v2.MDASequence.event_builder
¶
event_builder: Annotated[EventBuilder[MDAEvent], ImportableObject()] | None = (
Field(default_factory=MDAEventBuilder, repr=False)
)
useq.v2.MDASequence.transforms
¶
transforms: tuple[
Annotated[EventTransform[MDAEvent], ImportableObject()], ...
] = Field(default_factory=_default_transforms, repr=False)
useq.v2.MDASequence.shape
property
¶
Return the shape of this sequence.
Note
This doesn't account for jagged arrays, like channels that exclude z stacks or skip timepoints.
useq.v2.MDASequence.sizes
property
¶
Mapping of axis name to size of that axis.
useq.v2.MDASequence.used_axes
property
¶
Return keys of the axes whose length is not 0.
useq.v2.MDASequence.time_plan
property
¶
time_plan: AxisIterable[float] | None
Return the time plan.
useq.v2.MDASequence.stage_positions
property
¶
Return the stage positions.
useq.v2.MDASequence.grid_plan
property
¶
grid_plan: AxisIterable[Position] | None
Return the grid plan.
MultiPositionPlan
¶
Bases: AxisIterable[Position]
Base class for all multi-position plans.
Attributes:
| Name | Type | Description |
|---|---|---|
axis_key |
str
|
A string id representing the axis. |
fov_width |
float | None
|
|
fov_height |
float | None
|
|
-
API Reference
useq-schema
useqv2 ClassesRandomPoints
useq.v2.MultiPositionPlan.contribute_to_mda_event
¶
Position
¶
Bases: MutableModel
Define a position in 3D space.
Any of the attributes can be None to indicate that the position is not
defined. For engines implementing support for useq, a position of None implies
"do not move" or "stay at current position" on that axis.
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float | None
|
X position in microns. |
y |
float | None
|
Y position in microns. |
z |
float | None
|
Z position in microns. |
name |
str | None
|
Optional name for the position. |
is_relative |
bool
|
If |
-
API Reference
useq-schema
useqv2
-
API Reference
useq-schema
useqv2 Classes
StagePositions
¶
Bases: AxisIterable[Position], FrozenModel
Attributes:
| Name | Type | Description |
|---|---|---|
axis_key |
Literal[<Axis.POSITION: 'p'>]
|
A string id representing the axis. |
values |
list[Position | MDASequence]
|
|
useq.v2.StagePositions.axis_key
¶
MultiPhaseTimePlan
¶
Bases: TimePlan
Time sequence composed of multiple phases.
Attributes:
| Name | Type | Description |
|---|---|---|
phases |
list[TIntervalDuration | TIntervalLoops | TDurationLoops]
|
Sequence of time plans. |
axis_key |
str
|
A string id representing the axis. |
prioritize_duration |
bool
|
|
-
API Reference
useq-schema
useqv2 AttributesAnyTimePlan
TDurationLoops
¶
Define temporal sequence using duration and number of loops.
Attributes:
| Name | Type | Description |
|---|---|---|
duration |
timedelta
|
Total duration of sequence. Scalars are interpreted as seconds. Strings are parsed according to ISO 8601. |
loops |
int
|
Number of frames. |
prioritize_duration |
bool
|
If |
axis_key |
str
|
A string id representing the axis. |
-
API Reference
useq-schema
useqv2 AttributesSinglePhaseTimePlan
TimePlan
¶
Bases: AxisIterable[float], FrozenModel
Attributes:
| Name | Type | Description |
|---|---|---|
axis_key |
str
|
A string id representing the axis. |
prioritize_duration |
bool
|
|
-
API Reference
useq-schema
useqv2 Classes
useq.v2.TimePlan.contribute_to_mda_event
¶
TIntervalDuration
¶
Bases: TimePlan
Define temporal sequence using interval and duration.
Attributes:
| Name | Type | Description |
|---|---|---|
interval |
timedelta
|
Time between frames. Scalars are interpreted as seconds. Strings are parsed according to ISO 8601. |
duration |
timedelta | None
|
Total duration of sequence. If |
prioritize_duration |
bool
|
If |
axis_key |
str
|
A string id representing the axis. |
-
API Reference
useq-schema
useqv2 AttributesSinglePhaseTimePlan
TIntervalLoops
¶
Define temporal sequence using interval and number of loops.
Attributes:
| Name | Type | Description |
|---|---|---|
interval |
timedelta
|
Time between frames. Scalars are interpreted as seconds. Strings are parsed according to ISO 8601. |
loops |
int
|
Number of frames. |
prioritize_duration |
bool
|
If |
axis_key |
str
|
A string id representing the axis. |
-
API Reference
useq-schema
useqv2 AttributesSinglePhaseTimePlan
AutoFocusTransform
¶
AutoFocusTransform(af_plan: AxesBasedAF)
Bases: EventTransform[MDAEvent]
Insert hardware-autofocus events created by an AutoFocusPlan.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
af_plan
|
AxesBasedAF
|
The autofocus plan. An autofocus event is inserted whenever one of
|
required |
KeepShutterOpenTransform
¶
Bases: EventTransform[MDAEvent]
Replicates the v1 keep_shutter_open_across behaviour.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
axes
|
tuple[str, ...]
|
Tuple of axis names ( |
required |
ResetEventTimerTransform
¶
Bases: EventTransform[MDAEvent]
Marks the first frame of each timepoint with reset_event_timer=True.
ZAboveBelow
¶
Bases: ZPlan
Define Z as asymmetric range above and below some reference position.
Note that below will always be visited, regardless of go_up, while above will
always be encompassed by the range, but may not be precisely visited if the step
size does not divide evenly into the range.
Attributes:
| Name | Type | Description |
|---|---|---|
above |
float
|
Range above reference position in microns (inclusive). |
below |
float
|
Range below reference position in microns (inclusive). |
step |
float
|
Step size in microns. |
go_up |
bool
|
If |
axis_key |
Literal[<Axis.Z: 'z'>]
|
A string id representing the axis. |
-
API Reference
useq-schema
useqv2 AttributesAnyZPlan
ZAbsolutePositions
¶
Bases: ZPlan
Define Z as a list of absolute positions.
Attributes:
| Name | Type | Description |
|---|---|---|
absolute |
list[float]
|
List of absolute z positions. |
axis_key |
Literal[<Axis.Z: 'z'>]
|
A string id representing the axis. |
-
API Reference
useq-schema
useqv2 AttributesAnyZPlan
ZPlan
¶
Bases: AxisIterable[Position], FrozenModel
Base class for Z-axis plans in v2 MDA sequences.
All Z plans inherit from MDAAxisIterable and can be used in the new v2 MDA sequence framework.
Attributes:
| Name | Type | Description |
|---|---|---|
axis_key |
Literal[<Axis.Z: 'z'>]
|
A string id representing the axis. |
ZRangeAround
¶
Bases: ZPlan
Define Z as a symmetric range around some reference position.
Note that -range / 2 will always be visited, regardless of go_up, while
+range / 2 will always be encompassed by the range, but may not be precisely
visited if the step size does not divide evenly into the range.
Attributes:
| Name | Type | Description |
|---|---|---|
range |
float
|
Range in microns (inclusive). For example, a range of 4 with a step size of 1 would visit [-2, -1, 0, 1, 2]. |
step |
float
|
Step size in microns. |
go_up |
bool
|
If |
axis_key |
Literal[<Axis.Z: 'z'>]
|
A string id representing the axis. |
-
API Reference
useq-schema
useqv2 AttributesAnyZPlan
ZRelativePositions
¶
Bases: ZPlan
Define Z as a list of positions relative to some reference.
Typically, the "reference" will be whatever the current Z position is at the start of the sequence.
Attributes:
| Name | Type | Description |
|---|---|---|
relative |
list[float]
|
List of relative z positions. |
axis_key |
Literal[<Axis.Z: 'z'>]
|
A string id representing the axis. |
-
API Reference
useq-schema
useqv2 AttributesAnyZPlan
ZTopBottom
¶
Bases: ZPlan
Define Z using absolute top & bottom positions.
Note that bottom will always be visited, regardless of go_up, while top will
always be encompassed by the range, but may not be precisely visited if the step
size does not divide evenly into the range.
Attributes:
| Name | Type | Description |
|---|---|---|
top |
float
|
Top position in microns (inclusive). |
bottom |
float
|
Bottom position in microns (inclusive). |
step |
float
|
Step size in microns. |
go_up |
bool
|
If |
axis_key |
Literal[<Axis.Z: 'z'>]
|
A string id representing the axis. |
-
API Reference
useq-schema
useqv2 AttributesAnyZPlan
Functions¶
iterate_multi_dim_sequence
¶
iterate_multi_dim_sequence(
seq: MultiAxisSequence, axis_order: tuple[str, ...] | None = None
) -> Iterator[AxesIndexWithContext]
Iterate over a MultiDimSequence.
Orders the base axes (if an axis_order is provided) and then iterates over all index combinations using iterate_axes_recursive. The parent's axis_order is passed down to nested sequences.
Yields:
| Type | Description |
|---|---|
AxesIndexWithContext
|
A tuple of (AxesIndex, MultiAxisSequence) where AxesIndex is a dictionary mapping axis keys to tuples of (index, value, axis), and MultiAxisSequence is the context that generated this axes combination. |
Attributes¶
RelativeMultiPointPlan
¶
RelativeMultiPointPlan = GridRowsColumns | GridWidthHeight | RandomPoints
-
API Reference
useq-schema
useqv2 AttributesMultiPointPlan
SinglePhaseTimePlan
¶
SinglePhaseTimePlan = TIntervalDuration | TIntervalLoops | TDurationLoops
-
API Reference
useq-schema
useqv2 ClassesMultiPhaseTimePlanphases
-
API Reference
useq-schema
useqv2 AttributesAnyTimePlan
AnyZPlan
¶
AnyZPlan = (
ZTopBottom
| ZAboveBelow
| ZRangeAround
| ZAbsolutePositions
| ZRelativePositions
)
Re-exports¶
These can also be imported from this module, but each is documented under its shortest import path (linked below).
| Name | Description |
|---|---|
AcquireImage |
useq.Action to acquire an image. |
Action |
Base class for a useq.MDAEvent action. |
AnyAutofocusPlan |
|
AutoFocusPlan |
Base class for hardware autofocus plans. |
AxesBasedAF |
Autofocus plan that performs autofocus when any of the specified axes change. |
Axis |
Recognized useq-schema axis keys. |
Channel |
Define an acquisition channel. |
CustomAction |
useq.Action to perform a custom action. |
EventChannel |
Channel in a MDA event. |
HardwareAutofocus |
useq.Action to perform a hardware autofocus. |
MDAEvent |
Define a single event in a MDASequence. |
OrderMode |
Order in which grid positions will be iterated. |
PropertyTuple |
Three-tuple capturing a device, property, and value. |
SLMImage |
SLM Image in a MDA event. |
Shape |
Shape of the bounding box for random points. |
TraversalOrder |
Order in which random points are visited. |
WellPlate |
A multi-well plate definition. |
WellPlatePlan |
A plan for acquiring images from a multi-well plate. |
register_well_plates |
Register well-plate definitions to allow lookup by key. |
registered_well_plate_keys |
Return a set of all registered well-plate keys. |