Data inspection and selection¶
Use these guides to compare linked views and extract a region of interest.
Comparing data in linked ImageTools¶
Use linked ImageTools when several datasets share coordinates and must be inspected at the same positions.
From Python, open the arrays together:
import erlab.interactive as eri
eri.itool([data_a, data_b], link=True)
In Manager, select the ImageTool rows and choose Link or press Ctrl+L. Move a cursor and change a bin width to confirm that the windows follow the same coordinates.
Linked windows share cursor positions, bin widths, cursor counts, and plot-layout proportions. If the coordinates are not compatible, select only comparable windows or inspect them independently. Use Unlink or Ctrl+Shift+L when later changes must remain independent.
Extracting data along a polygonal path¶
Use this task when a cut must follow a path that is not aligned with the data axes.
Right-click an image plot and choose Add Polygon ROI.
Drag the handles to place the vertices along the required path.
Click a segment to add a vertex when the path needs another point.
Right-click the ROI and choose Edit ROI… when you must enter exact coordinates.
Leave Closed off.
Right-click the ROI and choose Slice Along ROI Path.
Set the step size and the name of the new path dimension.
Select the required Result Placement and create the result.
Inspect the path coordinate and the source coordinates in the new ImageTool.
The operation uses erlab.analysis.interpolate.slice_along_path(). It interpolates
the complete data volume along the path. A smaller step adds output samples, but it does
not add measured resolution.
Masking data with a polygonal ROI¶
Use this task when an analysis must retain values on one side of a polygon boundary.
Right-click an image plot and choose Add Polygon ROI.
Drag the handles to place the polygon vertices.
Click a segment to add a vertex when the boundary needs another point.
Right-click the ROI and choose Edit ROI… when you must enter exact coordinates.
Turn on Closed.
Right-click the ROI and choose Mask Data with ROI.
Select whether to invert the mask.
Select whether to trim coordinate ranges that contain only masked values.
Select the required Result Placement and create the result.
Inspect the masked region and coordinate ranges in the new ImageTool.
The operation uses erlab.analysis.mask.mask_with_polygon(). It applies the polygon
to the complete data volume, not only to the visible slice. Masked points remain missing
values unless you trim ranges that contain no retained data.