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 [gkam, gid, kam] = gKAM(ebsd,varargin) | |
% calculate grain average misorientation angle from KAM | |
% input: | |
% ebsd (with grainID) | |
% | |
% options: | |
% threshold: angles to ignore (upper limit) in radian | |
% lowlim: angles to ignore: (lower limit) in radian | |
% order: 1st,2nd etc. neighbourhood around each point | |
% |
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
%% select profile | |
lineX = ginput(2) % select a line | |
[ebsd_lineX, dist ]= spatialProfile(ebsd,lineX); %extract orientations | |
%% average orientations perpendicular to profile and plot things along line | |
clear meanO | |
% average along line (put 0 if you want no averaging) | |
%////////////////////////////////////////////////////// | |
av_width = 8 %number of pixels to average perp to line (towards both sides | |
% use 0 to use only ebsd_lineX |
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 saveFigure(fname,varargin) | |
% save figure as graphics file | |
% | |
% Description | |
% This function is supposed to produce cropped, publication ready image | |
% files from your plots. The format of the file is determined by the | |
% extension of the filename. | |
% | |
% Syntax | |
% saveFigure(fname) |
NewerOlder