defdap.inspector module¶
- class defdap.inspector.GrainInspector(selected_dic_map, vmax, correction_angle=0, rdr_line_length=3)[source]¶
Bases:
object
Class containing the interactive grain inspector tool for slip trace analysis and relative displacement ratio analysis.
- goto_grain(event, plot)[source]¶
Go to a specified grain ID.
- Parameters:
event (
int
) – Grain ID to go to.
- save_line(event, plot)[source]¶
Save the start point, end point and angle of drawn line into the grain.
- Parameters:
event (
ndarray
) – Start x, start y, end x, end y point of line passed from drawn line.
- group_lines(grain=None)[source]¶
Group the lines drawn in the current grain item using a mean shift algorithm, save the average angle and then detect the active slip planes.
groups_list is a list of line groups: [id, angle, [slip plane id], [angular deviation]
- Parameters:
grain (defdap.hrdic.Grain) – Grain for which to group the slip lines.
- remove_line(event, plot)[source]¶
Remove single line [runs after submitting a text box].
- Parameters:
event (
int
) – Line ID to remove.
- run_rdr_group(event, plot)[source]¶
Run RDR on a specified group, upon submitting a text box.
- Parameters:
event (
int
) – Group ID specified from text box.
- batch_run_sta(event, plot)[source]¶
Run slip trace analysis on all grains which hve slip trace lines drawn.
- calc_rdr(grain, group, show_plot=True)[source]¶
Calculates the relative displacement ratio for a given grain and group.
- plot_rdr(grain, group, u_list, v_list, x_list, y_list, lin_reg_result)[source]¶
Plot rdr figure, including location of perpendicular lines and scatter plot of ucentered vs vcentered.
- update_filename(event, plot)[source]¶
Update class variable filename, based on text input from textbox handler.
- event:
Text in textbox.