CalcDensity Max() raises error

47 views
Skip to first unread message

Ali Durmaz

unread,
May 11, 2020, 8:08:41 AM5/11/20
to MTEX


Hello everybody,

I got an error within the calcDensity function and to be more specific inside the max()-function. "Invalid data type. First argument must be numeric or logical."

Currently, I try to compute an odf 


odf = calcDensity(ebsd_smoothed_ferrite.orientations);

in order to subsequently plot an IPDF.

plotIPDF(odf, xvector, 'antipodal')


This issue happens if I use my ferrite data set but also if I use the Titanium dataset ("mtexdata Titanium") as suggested here: https://mtex-toolbox.github.io/ODFTheory.html I attached a screen shot of the contents in the orientation variable for my data set. Matlab2018b and MTEX 5.1.1 were used. Thanks in advance for your efforts. Best regards Ali
orientation_contents.PNG

Rüdiger

unread,
May 11, 2020, 8:30:59 AM5/11/20
to mtex...@googlegroups.com
Hi Ali,
can you try a recent mtex version?
Cheers,
Rüdiger


Ali Durmaz

unread,
May 11, 2020, 4:28:37 PM5/11/20
to MTEX
Hi Rüdiger,

Thanks for your reply!

In meanwhile I found the old homepage with the old documentation.

solved it with some older code snippets extracted from there.

psi = calcKernel(ebsd_smoothed_ferrite.orientations);
odf
= calcODF(ebsd_smoothed_ferrite.orientations,'kernel',psi);

Most likely, changing to a newer version would have solved it as well.


Nonetheless, I have one more question kinda related to prior. In the attached Image I have five IPDF plots. 

- two discrete ones with x-axis at Damage locations and Schmid isolines for bcc (Bottom center and Bottom right)
- One where there is an odf computed from the x-axis orientations at damage Locations (top Center). 
- one odf which was not limited to damage locations but includes the x-axis of every Pixel on the sample (top left).
- And the difference of Prior two (Bottom left)

First of all does the damage odf as a result from the discrete Damage Points make sense to you? As far as I understand odf's, the colorbars are in multiples of random (MOR). I was wondering how I can make a relative odf, where I relate the frequency in the damage locations odf to the frequency in the overall odf. Subtracting however, does not seem to give an appropriate measure.

I guess it is fair to say that when considering only Damage pixels the texture is weakened (compare two upper odf's). So Damage sticks more to the high Schmid factor regions than to the frequency orientations in the Overall odf. I would love to get an quantitative insight here.

Thanks in Advance for your efforts!

Best regards
Ali  
MTEX_damage_loading_axis_odfs.PNG

Rüdiger Kilian

unread,
May 12, 2020, 4:36:18 AM5/12/20
to mtex...@googlegroups.com
Hi,
>> First of all does the damage odf as a result from the discrete Damage Points make sense to you?
I don't know how I should know that.

You probably have to distinguish between the things you want to display. If you plot an ipf you plot some property or function with respect to crystal coordinates, e.g. in the case of densities, what proportion of your sample has a certain crystal direction aligned to your specimen reference direction.
But you can also plot and contour any other property which depends on crystal coordiantes, e.g. the Schmid factor example you have computed there.
Example
cs = crystalSymmetry('-3m')
% some orientations
odf = unimodalODF(orientation.byEuler(0,45*degree,0,cs),cs,'halfwidth',20*degree)
o = odf.discreteSample(1000);
ref= xvector
% some property
sS = slipSystem.basal(cs)
prop = SchmidFactor(o*sS,ref)
% density of points
sf = calcDensity(inv(o)*ref)
% interpolation of property at points
si = interp(inv(o)*ref,prop,'harmonicApproximation')

% plotIPDF(o,ref)
% hold on
% plot(sf,'contour','Linestyle','--','Linewidth',2)
% plot(sf)
plotIPDF(o,ref)
hold on
plot(si,'contour','Linewidth',2)
hold off

Hope this helps,
Rüdiger






Reply all
Reply to author
Forward
0 new messages