pymmcore_widgets.useq_widgets
¶
Widgets for the useq-schema data model.
Submodules
| Name | Description |
|---|---|
points_plans |
Widgets that create MultiPoint plans. |
Classes
| Name | Description |
|---|---|
BoolColumn |
Column of checkboxes (bool values). |
ChoiceColumn |
Column of combo boxes, choosing from allowed_values. |
DataTable |
Table whose columns are defined by ColumnInfo class attributes. |
DataTableWidget |
A DataTable with a toolbar to add, select and remove rows. |
FloatColumn |
Column of float spin boxes, between minimum and maximum. |
IntColumn |
Column of integer spin boxes, between minimum and maximum. |
PointsPlanWidget |
Widget to select the FOVs per well of the plate. |
TextColumn |
Column that will use a standard QTableWidgetItem. |
TimeDeltaColumn |
Column of durations, typed as text with units (e.g. "1.5 s", "2 min"). |
WellPlateWidget |
Widget for selecting a well plate and a subset of wells. |
Attributes
| Name | Description |
|---|---|
PYMMCW_METADATA_KEY |
Classes¶
BoolColumn
dataclass
¶
BoolColumn(
_ROLE: int = UserRole + 1,
header: str | None = None,
is_row_selector: bool = False,
hidden: bool = False,
default: Any = None,
default_factory: Callable[[], Any] | None = None,
data_type: WdgGetSet = TableBoolWidget,
)
ChoiceColumn
dataclass
¶
ChoiceColumn(
_ROLE: int = UserRole + 1,
header: str | None = None,
is_row_selector: bool = False,
hidden: bool = False,
default: Any = None,
default_factory: Callable[[], Any] | None = None,
data_type: WdgGetSet[CheckableCombo, str] = ChoiceWidget,
allowed_values: tuple[str, ...] | None = None,
)
FloatColumn
dataclass
¶
FloatColumn(
_ROLE: int = UserRole + 1,
header: str | None = None,
is_row_selector: bool = False,
hidden: bool = False,
default: Any = None,
default_factory: Callable[[], Any] | None = None,
minimum: float = 0,
maximum: float = 999999,
decimals: int = 2,
data_type: WdgGetSet = TableFloatWidget,
)
IntColumn
dataclass
¶
IntColumn(
_ROLE: int = UserRole + 1,
header: str | None = None,
is_row_selector: bool = False,
hidden: bool = False,
default: Any = None,
default_factory: Callable[[], Any] | None = None,
minimum: int = 0,
maximum: int = 999999999,
decimals: int = 2,
data_type: WdgGetSet = TableIntWidget,
)
TextColumn
dataclass
¶
TextColumn(
_ROLE: int = UserRole + 1,
header: str | None = None,
is_row_selector: bool = False,
hidden: bool = False,
default: str | None = None,
default_factory: Callable[[], Any] | None = None,
data_type: type = str,
checkable: bool = False,
checked: bool = True,
)
TimeDeltaColumn
dataclass
¶
TimeDeltaColumn(
_ROLE: int = UserRole + 1,
header: str | None = None,
is_row_selector: bool = False,
hidden: bool = False,
default: Any = None,
default_factory: Callable[[], Any] | None = None,
data_type: WdgGetSet[QTimeLineEdit, float] = TableTimeWidget,
minimum_unit: Unit = "seconds",
)
DataTable
¶
DataTable(rows: int = 0, parent: QWidget | None = None)
Bases: QTableWidget
Table whose columns are defined by ColumnInfo class attributes.
addColumn
¶
addColumn(column_info: ColumnInfo, position: int | None = None) -> None
Add a new column to the table.
The ColumnInfo object is stored in the header item's data and used to populate the new column, and new rows that are added later, based on the data type and other info in the ColumnInfo object.
DataTableWidget
¶
DataTableWidget(rows: int = 0, parent: QWidget | None = None)
Bases: QWidget
A DataTable with a toolbar to add, select and remove rows.
Base class of ChannelTable,
PositionTable and
TimePlanWidget.
WellPlateWidget
¶
WellPlateWidget(
plan: WellPlatePlan | WellPlate | None = None, parent: QWidget | None = None
)
Bases: QWidget
Widget for selecting a well plate and a subset of wells.
The value returned/received by this widget is a useq.WellPlatePlan (or simply a useq.WellPlate if no selection is made). This widget draws the well plate and allows the user to select wells by clicking/dragging on them.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
plan
|
WellPlatePlan | WellPlate | None
|
The initial well plate plan. Accepts both a useq.WellPlate (which lacks a selection definition), or a full WellPlatePlan. By default None. |
None
|
parent
|
QWidget
|
The parent widget, by default None |
None
|
valueChanged
¶
valueChanged = Signal(object)
Emitted with the new useq.WellPlatePlan when the plate or selection changes.
setShowRotation
¶
setShowRotation(allow: bool) -> None
Set whether to allow visible rotation of the well plate.
If allow is False, the rotation checkbox is hidden and the rotation is
never shown. If True, the checkbox is shown and the user can toggle the
rotation on/off.
value
¶
value() -> WellPlatePlan
Return the current plate and the selected wells as a useq.WellPlatePlan.
setValue
¶
setValue(value: WellPlatePlan | WellPlate | Mapping) -> None
Set the current plate and the selected wells.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
PlateInfo
|
The plate information to set containing the plate and the selected wells as a list of (name, row, column). |
required |
currentSelection
¶
Return the indices of the selected wells as ((row, col), ...).
setCurrentSelection
¶
Select the wells with the given indices.
selection can be any 2-d numpy indexing expression, e.g.:
- (0, 0)
- [(0, 0), (1, 1), (2, 2)]
- slice(0, 2)
- (0, slice(0, 2))
PointsPlanWidget
¶
PointsPlanWidget(
plan: RelativeMultiPointPlan | None = None, parent: QWidget | None = None
)
Bases: QWidget
Widget to select the FOVs per well of the plate.
This widget allows the user to select the number of FOVs per well, (or to generally show a multi-point plan, such as a grid or random points plan, even if not within the context of a well plate.)
The value() method returns the selected plan, one of: - useq.GridRowsColumns - useq.RandomPoints - useq.RelativePosition
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
plan
|
RelativeMultiPointPlan | None
|
The useq MultiPoint plan to display and edit. |
None
|
parent
|
QWidget | None
|
The parent widget. |
None
|
Attributes¶
Re-exports¶
These can also be imported from this module, but each is documented under its shortest import path (linked below).
| Name | Description |
|---|---|
ChannelTable |
Table to edit a list of channels (useq.Channel). |
GridPlanWidget |
Widget to edit a grid plan. |
MDASequenceWidget |
A widget that provides a GUI to construct and edit a useq.MDASequence. |
PositionTable |
Table to edit a list of stage positions (useq.Position). |
TimePlanWidget |
Table to edit a time plan (useq.AnyTimePlan), one row per phase. |
ZPlanWidget |
Widget to edit a z plan (useq.AnyZPlan). |