-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit c529226
Showing
81 changed files
with
10,345 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
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 not shown.
Oops, something went wrong.