This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% Draw HCP or cubic unit cells overlaid on EBSD Map rotated by Euler angles | |
%rev 1. | |
%file assumes the following; -you select the crystal unit cell to draw | |
%-that the default for HCP is z//c axis, x//to [1,0,-1,0], | |
%that the default for cubic is faces aligned with axes | |
%no promises at all, but a pole figure plotting utility included to check your annotations (based on mtex and not my work) | |
%IF YOUR DATA HAS MORE THAN ONE PHASE you'll need to edit the plot(ebsd...line) | |
%Rev1; fixed problem with cases where maps plotted with z into plane. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% Creates pole figure and inverse pole figure maps of schmid factor | |
% Rev 0-Created Jan 21, 2017 by J. Hiscocks | |
%rev 1 fixed IPF point generation issue | |
%rev 2 added more graph outputs to IPF and titles etc. | |
%note that IPF section is the second half, and variables are not shared. | |
%on a pole figure(PF), we can plot the Schmid factor(SF) of a specific | |
%orientation that has forces applied in a variety of orientations. For a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% Plot directional Young's modulus and it's inverse in 3D for HCP | |
%this script takes values of the stiffness tensor and creates a 3d plot of | |
%the values of S, or 1/S which equals the directional Young's modulus. It | |
%is currently set up for HCP, and two sets of values are provided. | |
%note that the surface plot method used here has trouble with 'undercut' shapes. | |
%since it works fine for my purposes I do not intend to alter it further, | |
%and have plotted by splitting into two surfaces and using hold on. This | |
%does not work well for the Zn figures which are dumbbell shaped. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% Schmid pole figure | |
%this script plots the orientation of a selected parent data point along | |
%with the possible twin variants and their schmid factors | |
%the function Schmid must be installed | |
%input; ebsd data must be available | |
%output; pole figure plots | |
cs=ebsd('Magnesium').CS; | |
% get the parent orientation | |
figure; plot(ebsd('Magnesium'), ebsd('Magnesium').orientations) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% MapSeg a script to segment ebsd data into a grid or strips | |
% code input; EBSD data in a variable named ebsd. | |
%both segx and segy must be positive integers | |
%code output ebsd variables named ebsd_1 through the total number of sections. | |
%note to run code repeatedly with the same number of segments, manually | |
%define segx and segy and comment out the prompts. | |
prompt = 'how many sections in x? '; | |
segx = input(prompt); | |
prompt = 'how many sections in y? '; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% Function to calculate the schmid factors for all magnesium slip/twin systems | |
%code input; EBSD data (ebsd variable), and a vector3d defining the applied | |
%tensile force (default is in x). | |
%output a 6 column array containing from left to right the SF of basal | |
%slip, the SF of prismatic slip, the SF of pyramidal slip, the SF of | |
%extension twinning, the lowest SF of the four available types and | |
%the index (column) of the lowest SF of the four systems. Information for plotting is at | |
%bottom. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% CRYSTALLOGRAPHIC VARIABLE LIST | |
%This code analyses EBSD data and outputs information for all | |
%mergedGrains and grains. This version of the code assumes the largest | |
%grain composing the merged grain is the parent, BUT CHECKS MANUALLY WITH | |
%THE USER FOR CONFIRMATION. For automatic acceptance of the largest | |
% parent see Parent_Twin_Area instead. | |
%Customization options include material, twinning type, | |
%and direction of applied force (r) | |
%input; EBSD data (ebsd variable). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% CRYSTALLOGRAPHIC VARIABLE LIST | |
%This code analyses EBSD data and outputs information for all | |
%mergedGrains and grains. This version of the code assumes the largest | |
%grain composing the merged grain is the parent. For manual selection of | |
%the parent see Parent_Twin_Interact instead. | |
%Customization options include material, twinning type, | |
%and direction of applied force (r) | |
%input; EBSD data (ebsd variable). |