Skip to content

Commit

Permalink
Initial Upload
Browse files Browse the repository at this point in the history
  • Loading branch information
bjack205 committed Dec 27, 2014
0 parents commit c529226
Show file tree
Hide file tree
Showing 81 changed files with 10,345 additions and 0 deletions.
Binary file added AdvancedSettings.fig
Binary file not shown.
1,133 changes: 1,133 additions & 0 deletions AdvancedSettings.m

Large diffs are not rendered by default.

Binary file added BigGreenGUI.fig
Binary file not shown.
1,196 changes: 1,196 additions & 0 deletions BigGreenGUI.m

Large diffs are not rendered by default.

741 changes: 741 additions & 0 deletions CalcF.m

Large diffs are not rendered by default.

58 changes: 58 additions & 0 deletions CalcNormFMod.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
function [normF U] = CalcNormFMod(PC,I0,params2,lattice,a1,b1,c1,axs,g,X,ImageInd,Settings)

params2{1} = PC(1);
params2{2} = PC(2);
params2{3} = PC(3);
F = eye(3);

clear global rs cs Gs

% I2 = genEBSDPatternHybrid(g,params2,F,lattice,a1,b1,c1,axs);

% Remove rotational error first DTF 7/15/14
for i = 1:2
I1 = genEBSDPatternHybrid(g,params2,eye(3),lattice,a1,b1,c1,axs);
I1 = custimfilt(I1,X(1),Settings.PixelSize,X(3),X(4));
clear global rs cs Gs
% [F SSE] = CalcF(I1,I0,g,F,ImageInd,Settings,Settings.Material); % old version
[F SSE] = CalcF(I1,I0,g,eye(3),ImageInd,Settings,Settings.Phase{ImageInd}); % new DTF
[R U] = poldec(F);
g=R'*g;
end

% for i = 1:Settings.IterationLimit
for i = 1:3
I1 = genEBSDPatternHybrid(g,params2,F,lattice,a1,b1,c1,axs);
I1 = custimfilt(I1,X(1),Settings.PixelSize,X(3),X(4));

%Optical Distortion Only
% crpl=206; crpu=824;
% I1 = I1(crpl:crpu,crpl:crpu);
clear global rs cs Gs
% [F SSE] = calcFnew(I1,I0,g,F,paramsF,standev,6);
% [F SSE] = CalcF(I1,I0,g,F,ImageInd,Settings,Settings.Material);% ** same change as above DTF 7/21/14
[F SSE] = CalcF(I1,I0,g,F,ImageInd,Settings,Settings.Phase{ImageInd});
end

[R U] = poldec(F);

U = U-eye(3);
% D = F-eye(3);

% angle = GeneralMisoCalc(R,eye(3),lattice);

% if angle >= 0.5
% normF = sum(sum((D.*D)));
% else
%normF = sum(sum((U.*U))); experimentally removed by Craig and Tim and replaced by below, Aug27 2014
normF=norm(U);
% end

% disp(F)
% disp(U)
% disp(PC)
% disp(SSE)
% disp(angle)

% save I2 I2
% keyboard
Binary file added DDSettings.mat
Binary file not shown.
Loading

0 comments on commit c529226

Please sign in to comment.