Plotting a Taylor factor on ODF section using MTEX

252 views
Skip to first unread message

Mehdi Sanjari

unread,
Oct 25, 2016, 11:40:48 AM10/25/16
to MTEX
I am having a dataset  ( VPSC output results) having five columns, the first three columns contain the Euler angles and the fourth contains is the associated volume fraction and the fifth column is the Taylor factor for those orientation (Attache you can find as an example). There are 1000 orientations. I am wondering what would be easiest way to plot Taylor factor on ODF sections (below)? Thanks


taylor_factor_data.txt
taylor_factor_section45.png

Ralf Hielscher

unread,
Oct 28, 2016, 8:52:37 AM10/28/16
to mtex...@googlegroups.com
Hi Mehdi,

this is quite a tough problem. First you might import you data like this


%// I assume this is your crystal and specimen symmetry - right?
cs
= crystalSymmetry('432')
ss
= specimenSymmetry('222')

ori = loadOrientation_generic('taylor_factor_data.txt','ColumnNames',{'phi1','Phi','phi2'},cs,ss)

The taylor factors you get by

data = txt2mat('taylor_factor_data.txt');
taylor
= data(:,5);

Next you can plot the taylor factor with respect to the orientations

oR = phi2Sections(cs,ss)
oR
.plot(ori,taylor)





You see that your orientations cover the orientation space very unevenly. This causes problems when drawing contours with

oR.plot(ori,taylor,'contourf')

You can overcome these problems a bit by editing the function vector3d/interp by hand. Simply insert before line 3

% we need unique input data
[v,ind] = unique(v);
y
= y(ind);
varargin = {};
%varargin = {'inverseDistance'};

and then do again

oR.plot(ori,taylor,'contourf')

and you will get



Maybe this is ok for you??

Ralf

Ralf Hielscher

unread,
Oct 28, 2016, 8:55:02 AM10/28/16
to MTEX
You may also try 

varargin = {}


instead of 

varargin = {'inverse distance'}


This should give a more smooth result.

Ralf.



On Friday, October 28, 2016 at 2:52:37 PM UTC+2, Ralf Hielscher wrote:
Hi Mehdi,

this is quite a tough problem. First you might import you data like this


%// I assume this is your crystal and specimen symmetry - right?
cs
= crystalSymmetry('432')
ss
= specimenSymmetry('222')

ori = loadOrientation_generic('taylor_factor_data.txt','ColumnNames',{'phi1','Phi','phi2'},cs,ss)

The taylor factors you get by

data = txt2mat('taylor_factor_data.txt');
taylor
= data(:,5);

Next you can plot the taylor factor with respect to the orientations

oR = phi2Sections(cs,ss)
oR
.plot(ori,taylor)





You see that your orientations cover the orientation space very unevenly. This causes problems when drawing contours with

oR.plot(ori,taylor,'contourf')

You can overcome these problems a bit by editing the function vector3d/interp by hand. Simply insert before line 3

% we need unique input data
[v,ind] = unique(v);
y
= y(ind);

varargin
= {'inverseDistance'};

Mehdi Sanjari

unread,
Nov 1, 2016, 9:55:04 AM11/1/16
to MTEX
Thanks a lot Dr Hielscher. 
Reply all
Reply to author
Forward
0 new messages