defdap.inspector module¶
-
class
defdap.inspector.
GrainInspector
(currMap, vmax, corrAngle, RDRlength)[source]¶ Bases:
object
Class containing the interactive grain inspector tool for slip trace analysis and relative displacement ratio analysis.
-
gotoGrain
(event, plot)[source]¶ Go to a specified grain ID.
- Parameters:
event (
int
) – Grain ID to go to.
-
saveLine
(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.
-
groupLines
(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.
groupsList 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.
-
removeLine
(event, plot)[source]¶ Remove single line [runs after submitting a text box].
- Parameters:
event (
int
) – Line ID to remove.
-
runRDRGroup
(event, plot)[source]¶ Run RDR on a specified group, upon submitting a text box.
- Parameters:
event (
int
) – Group ID specified from text box.
-
batchRunSTA
(event, plot)[source]¶ Run slip trace analysis on all grains which hve slip trace lines drawn.
-
calcRDR
(grain, group, showPlot=True)[source]¶ Calculates the relative displacement ratio for a given grain and group.
-
plotRDR
(grain, group, ulist, vlist, allxlist, allylist, linRegResults)[source]¶ Plot RDR figure, including location of perpendicular lines and scatter plot of ucentered vs vcentered.
-
updateFilename
(event, plot)[source]¶ Update class variable filename, based on text input from textbox handler.
- event:
Text in textbox.
-