Interactive (erlab.interactive
)¶
Interactive plotting based on Qt and pyqtgraph.
Interactive tools¶
Interactive data browser. |
|
Functions for manipulating colors in Qt. |
|
Interactive momentum conversion tool. |
|
Interactive tool for visualizing dispersive data. |
|
Various helper functions and extensions to pyqtgraph. |
- erlab.interactive.goldtool(data, data_corr=None, *, data_name=None, **kwargs)[source]¶
Interactive gold edge fitting.
- Parameters:
data (DataArray) – The data to perform Fermi edge fitting on.
data_corr (DataArray | None) – The data to correct with the edge. Defaults to
data
.data_name (str | None) – Name of the data used in generating the code snipped copied to the clipboard. Overrides automatic detection.
**kwargs – Arguments passed onto
erlab.interactive.utilities.AnalysisWindow
.
- erlab.interactive.itool(data, link=False, link_colors=True, execute=None, **kwargs)[source]¶
Create and display an ImageTool window.
- Parameters:
data (Collection[xr.DataArray | npt.NDArray] | xr.DataArray | npt.NDArray | xr.Dataset) – Array-like object or a sequence of such object with 2 to 4 dimensions. See notes.
link (bool) – Whether to enable linking between multiple ImageTool windows, by default
False
.link_colors (bool) – Whether to link the color maps between multiple linked ImageTool windows, by default
True
.execute (bool | None) – Whether to execute the Qt event loop and display the window, by default
None
. IfNone
, the execution is determined based on the current IPython shell.**kwargs – Additional keyword arguments to be passed onto the underlying slicer area. For a full list of supported arguments, see the
erlab.interactive.imagetool.core.ImageSlicerArea
documentation.
- Returns:
The created ImageTool window(s).
- Return type:
ImageTool
orlist
ofImageTool
Notes
If
data
is a sequence of valid data, multiple ImageTool windows will be created and displayed.If
data
is a Dataset, each DataArray in the Dataset will be displayed in a separate ImageTool window. Data variables with 2 to 4 dimensions are considered as valid. Other variables are ignored.If
link
is True, the ImageTool windows will be synchronized.
Examples
>>> itool(data, cmap="gray", gamma=0.5) >>> itool(data_list, link=True)