GUI and Python Side by Side¶
ERLabPy has two main types of workflows:
Python code-based workflows in scripts and notebooks.
GUI workflows in ImageTool, the ImageTool manager, and other interactive tools.
The bridge between the two is built into the package. GUI actions either map directly to public Python APIs or can even generate reproducible code that is ready to paste back into a notebook. This design allows you to fluidly move between the GUI and code, using each where it is most effective.
Use the GUI to discover selections and parameters, then move the final steps back into code for reproducibility and batch processing.
Operation map¶
Analysis task |
GUI entry point |
Python/API equivalent |
|---|---|---|
Open a DataArray in ImageTool |
|
|
Browse a data directory |
|
|
Open or replace data in the manager |
|
|
Select a point or range from multidimensional data |
Edit → Select Data… or the right-click context menu of each plot |
|
Aggregate over dimensions |
||
Interpolate along a dimension |
||
Coarsen data |
|
|
Thin data |
||
Crop data |
||
Rotate or symmetrize |
Transform dialogs including Edit → Rotate and Edit → Symmetrize |
|
Edit or add coordinates |
Edit → Edit Coordinates in ImageTool data controls |
|
Edit or add attributes |
Edit → Edit Attributes in ImageTool data controls |
|
Swap dimensions |
||
Normalize interactively |
Expressions like |
|
Combine manager ImageTools |
Concatenate in the ImageTool manager |
|
Slice along an ROI path |
||
Mask with an ROI |
||
Momentum conversion |
ktool (Can be launched from the View menu) |
|
Interactive fitting |
ftool, goldtool, and restool (Can be launched from the Plot context menu) |
|
Pull data back out of the manager |
|