defdap.experiment module¶
- class defdap.experiment.Experiment[source]¶
Bases:
object
- warp_image(map_data, frame_1, frame_2, crop=True, **kwargs)[source]¶
Warps a map to the DIC frame.
- Parameters:
map_data (numpy.ndarray) – Data to warp.
crop (bool, optional) – Crop to size of DIC map if true.
kwargs – All other arguments passed to
skimage.transform.warp()
.
- Returns:
Map (i.e. EBSD map data) warped to the DIC frame.
- Return type:
- warp_lines(lines, frame_1, frame_2)[source]¶
Warp a set of lines to the DIC reference frame.
- Parameters:
lines (list of tuples) – Lines to warp. Each line is represented as a tuple of start and end coordinates (x, y).
- Returns:
List of warped lines with same representation as input.
- Return type:
list of tuples
- class defdap.experiment.Frame[source]¶
Bases:
object
- set_homog_points(points)[source]¶
- Parameters:
points (numpy.ndarray, optional) – Array of (x,y) homologous points to set explicitly.
- set_homog_point(map_obj, map_name=None, **kwargs)[source]¶
Interactive tool to set homologous points. Right-click on a point then click ‘save point’ to append to the homologous points list.
- Parameters:
map_name (str, optional) – Map data to plot for selecting points.
points (numpy.ndarray, optional) – Array of (x,y) homologous points to set explicitly.
kwargs (dict, optional) – Keyword arguments passed to
defdap.base.Map.plotHomog()
- static homog_click(event, plot)[source]¶
Event handler for capturing position when clicking on a map.
- Parameters:
event – Click event.
plot (defdap.plotting.MapPlot) – Plot to monitor.
- static homog_key(event, plot)[source]¶
Event handler for moving position using keyboard after clicking on a map.
- Parameters:
event – Keypress event.
plot (defdap.plotting.MapPlot) – Plot to monitor.
- homog_click_save(event, plot, binning)[source]¶
Append the selected point on the map to homogPoints.
- Parameters:
event – Button click event.
plot (defdap.plotting.MapPlot) – Plot to monitor.
binning (int, optional) – Binning applied to image, if applicable.