Open Matlab File in the Editor MTEX

The SantaFe example

Simulate a set of pole figures for the SantaFe standard ODF, estimate an ODF and compare it to the inital SantaFe ODF.

Simulate pole figures

CS = crystalSymmetry('m-3m');

% crystal directions
h = [Miller(1,0,0,CS),Miller(1,1,0,CS),Miller(1,1,1,CS),Miller(2,1,1,CS)];

% specimen directions
r = equispacedS2Grid('resolution',5*degree,'antipodal');

% pole figures
pf = calcPoleFigure(SantaFe,h,r);

% add some noise
pf = noisepf(pf,100);

% plot them
plot(pf,'MarkerSize',5)
mtexColorMap LaboTeX

ODF Estimation with Ghost Correction

rec = calcODF(pf)
initialize solver
start iteration
error: 7.3795E-02 2.6567E-02 8.6634E-03 6.7029E-03 6.0093E-03 5.6310E-03 5.4204E-03 5.2789E-03 5.1901E-03 5.1213E-03 5.0703E-03 
Finished PDF-ODF inversion.
error: 5.0703E-03
alpha: 1.0020E+02 1.0072E+02 1.0055E+02 9.9759E+01 
initialize solver
start iteration
error: 3.5410E-01 2.1125E-01 1.0681E-01 6.1475E-02 3.5220E-02 2.9691E-02 2.8731E-02 2.8181E-02 2.7793E-02 2.7482E-02 2.7236E-02 
Finished PDF-ODF inversion.
error: 2.7236E-02
alpha: 1.0030E+02 1.0064E+02 1.0052E+02 9.9771E+01 
 
rec = ODF  
  crystal symmetry : 432
  specimen symmetry: 222
 
  Uniform portion:
    weight: 0.6007
 
  Radially symmetric portion:
    kernel: de la Vallee Poussin, halfwidth 5°
    center: 1232 orientations, resolution: 5°
    weight: 0.3993
 

ODF Estimation without Ghost Correction

rec2 = calcODF(pf,'NoGhostCorrection')
initialize solver
start iteration
error: 7.3795E-02 2.6567E-02 8.6634E-03 6.7029E-03 6.0093E-03 5.6310E-03 5.4204E-03 5.2789E-03 5.1901E-03 5.1213E-03 5.0703E-03 
Finished PDF-ODF inversion.
error: 5.0703E-03
alpha: 1.0020E+02 1.0072E+02 1.0055E+02 9.9759E+01 
 
rec2 = ODF  
  crystal symmetry : 432
  specimen symmetry: 222
 
  Radially symmetric portion:
    kernel: de la Vallee Poussin, halfwidth 5°
    center: 1232 orientations, resolution: 5°
    weight: 1
 

Error analysis

% calculate RP error
calcError(rec,SantaFe)

% difference plot between meassured and recalculated pole figures
plotDiff(pf,rec)
ans =
    0.0414

Plot estimated pole figures

plotPDF(rec,pf.h,'antipodal')

Plot estimated ODF (Ghost Corrected)

plot(rec,'sections',18,'resolution',5*degree,...
  'contourf','FontSize',10,'silent','figSize','large','minmax')
mtexColorMap white2black

Plot odf

plot(SantaFe,'sections',18,'contourf','FontSize',10,'silent',...
  'figSize','large','minmax')
mtexColorMap white2black

Plot Fourier Coefficients

close all;
% true ODF
plotFourier(SantaFe,'bandwidth',32)
% keep plot for adding the next plots
hold all

% With ghost correction:
plotFourier(rec,'bandwidth',32)

% Without ghost correction:
plotFourier(rec2,'bandwidth',32)

legend({'true ODF','with ghost correction','without ghost correction'})
% next plot command overwrites plot
hold off