NumpyAxesSelector
:Widget to select a view from a numpy array¶
This module defines a widget able to convert a numpy array from n-dimensions to a numpy array with less dimensions.
-
class
NumpyAxesSelector
(parent=None)[source]¶ Widget to select a view from a numpy array.
The widget is set with an input data using
setData()
, and a requested output dimension usingsetAxisNames()
.Widgets are provided to selected expected input axis, and a slice on the non-selected axis.
The final selected array can be reached using the getter
selectedData()
, and the event selectionChanged.If the input data is a HDF5 Dataset, the selected output data will be a new numpy array.
-
dataChanged
¶ Emitted when the input data change
-
selectedAxisChanged
¶ Emitted when the selected axis change
-
selectionChanged
¶ Emitted when the selected data change
-
customAxisChanged
¶ Emitted when a custom axis change
-
setAxisNames
(axesNames)[source]¶ Set the axis names of the output selected data.
Axis names are defined from slower to faster axis.
The size of the list will constrain the dimension of the resulting array.
- Parameters
axesNames (List[str]) – List of distinct strings identifying axis names
-
setCustomAxis
(axesNames)[source]¶ Set the available list of named axis which can be set to a value.
- Parameters
axesNames (List[str]) – List of customable axis names
-