Plotting VPSC results with MTEX (Error in plotting simulation results of high number of steps)

321 views
Skip to first unread message

Ankit Bhandari

unread,
Mar 5, 2018, 3:35:33 PM3/5/18
to mtex...@googlegroups.com
Hi there !

I am plotting pole figures from VPSC modelling results. It works fine when the number of steps modelled are few (10-18). For more number of steps of deformation(>20) , I am getting the following message from the MATLAB:

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information. Error using call_extern (line 160)
  Error running external program: odf2fc show logfile

Error in unimodalComponent/calcFourier>gcA2fourier (line 68)
f = call_extern('odf2fc','EXTERN',g,c,A);



Can anyone please let me know about the possible problem with the code? Thanks in advance !

Regards,
Ankit Bhandari

ruediger Kilian

unread,
Mar 5, 2018, 3:40:54 PM3/5/18
to mtex...@googlegroups.com
Hi,
mind sharing the piece of code ion question? Otherwise it might be hard to guess.
Cheers,
Rüdiger
signature.asc

Ankit Bhandari

unread,
Mar 5, 2018, 4:36:32 PM3/5/18
to MTEX
Hello Rüdiger ,

Thanks for the prompt reply ! Following is the function that plots the pole figures. This code works when the time steps of deformation in VPSC model is <=18.

function stereoplot_contour_one(path,n,ns,mil,contourLimit,flg)

%% Specify Crystal and Specimen Symmetries

% crystal symmetry
CS = crystalSymmetry('6'); 
% specimen symmetry
SS = specimenSymmetry('-1');

% plotting convention
plotx2north

%% Specify File Names

% path to files

fn_tex='TEX_PH1.OUT';

fname=strcat(path,fn_tex);

%% Import the Data

% specify kernel 
psi = deLaValeePoussinKernel('halfwidth',10*degree);

% create an EBSD variable containing the data

odf = loadODF(fname,CS,SS,'density','kernel',psi,'resolution',5*degree,...
  'interface','VPSC');                                                              %%% Here is where the possible error is occuring !

mil3=-(mil(1)+mil(2));

%% Default template
%% Plot some Pole Figures

figure;

plotPDF(odf,Miller(mil(1),mil(2),mil3,mil(3),CS),'antipodal')
set(gca,'outerposition', [303.9000  -24.1500  270.0000  233.7750],'XDir','Reverse');



This is a part of a bigger code. I have shown the function where MATLAB is showing the possible error. Please let me know if more information is needed.
 I am curious to know, why it worked for less number of time steps, and not for more.  

Regards,
Ankit

Rüdiger Kilian

unread,
Mar 5, 2018, 5:02:05 PM3/5/18
to mtex...@googlegroups.com
Hi,
I suspect something during calcODF might go wrong with the file in question. Maybe it might help if you could share one of the files that fail if they are not too large?
Cheers,
Rüdiger

Ankit Bhandari

unread,
Mar 6, 2018, 11:52:16 AM3/6/18
to mtex...@googlegroups.com
Hello,

Please find attached files where the error is occurring. Following is the message I get from Matlab:

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information. 
Some parameters not found!Error using call_extern (line 160)
  Error running external program: odf2fc show logfile

Error in unimodalComponent/calcFourier>gcA2fourier (line 68)
f = call_extern('odf2fc','EXTERN',g,c,A);

Please let me know if more information is needed.
Thanks and Regards,
Ankit
call_extern.m
calcFourier.m

ruediger Kilian

unread,
Mar 6, 2018, 12:04:48 PM3/6/18
to mtex...@googlegroups.com
Hi Ankit,
sorry, I was rather referring to the input you used which produces the error, e.g. according from your example something like 'TEX_PH1.OUT'.

Cheers,
Rüdiger

Ankit Bhandari

unread,
Mar 6, 2018, 12:21:31 PM3/6/18
to MTEX
Hi Rüdiger,
Please find the attached file.
Regards,
Ankit
TEX_PH1.OUT

Ralf Hielscher

unread,
Mar 6, 2018, 2:00:52 PM3/6/18
to MTEX
Three questions / comments:

1. When startup MTEX with startup_mtex you do not get any error message?
2. In the error message you posted you can click "show logfile" which will give us more information what went wrong.
3. You may consider updating to MTEX 5.0 which works without these external binaries.

Ralf.

ruediger Kilian

unread,
Mar 6, 2018, 2:08:50 PM3/6/18
to MTEX

The file has 25 sections with 25 headers and only the last one is loaded, so in the present case, the first 12096 lines would be considered header, not sure if this is useful - apparently not. Can't you just write out the result into separate files or just discard whatever comes at the beginning?

With mtex5.0.1, the error message is the following (Using 'exact', no error is thrown but the odf is empty since nothing is loaded):

odf = loadODF(fname,CS,SS,'density','kernel',psi,'resolution',5*degree,...
'interface','VPSC')
Error using *
Inner matrix dimensions must agree.

Error in deg2dim (line 3)
d = l*(2*l-1)*(2*l+1)/3;

Error in FourierComponent/set.bandwidth (line 44)
newLength = deg2dim(L+1);

Error in FourierComponent (line 35)
component.bandwidth = find(component.power>1e-10,1,'last');

Error in ODF/FourierODF (line 18)
odf.components = {FourierComponent(f_hat,odf.CS,odf.SS)};

Error in orientation/calcFourierODF (line 54)
odf = FourierODF(odf,get_option(varargin,{'L','bandwidth','fourier'},L,'double'));

Error in orientation/calcODF (line 64)
odf = calcFourierODF(ori,varargin{:},'kernel',psi);

Error in loadODF_generic (line 113)
odf = calcODF(ori,'weights',weights,'silent',varargin{:});

Error in loadODF_VPSC (line 16)
[odf,options] = loadODF_generic(fname,'bunge','degree',...

Error in loadData (line 106)
data{k} = feval(['load' type '_',char(interface)],...

Error in loadODF (line 31)
[odf,interface,options] = loadData(fname,'ODF',varargin{:});







signature.asc

Ankit Bhandari

unread,
Mar 6, 2018, 7:22:53 PM3/6/18
to MTEX
Hi there,

I tried this simple code and got the attached plot. (This works for 100 or more deformation steps now !) However, there is one problem. The VPSC code I use is for quartz cpo, but when I am trying to use 
CS= crystalSymmetry('6');
instead of
CS= crystalSymmetry('1')

I get this error:
Error using symmetry/ensureCS (line 53)
The above two symmetries does not match!

Can you please let me know what could be this problem?

Thanks and Regards,
Ankit
PlotTexture_AB.m
output.jpg

Ralf Hielscher

unread,
Mar 7, 2018, 1:45:10 AM3/7/18
to MTEX
correct syntax is

texfile= 'TEX_PH1.OUT';
CS
= crystalSymmetry('321',[4.9, 4.9, 5.4]); %// isn't Quartz trigonal ??? also the correct axes length matters

data
= loadOrientation_generic(texfile,'CS',CS,'ColumnNames',{'Euler1' 'Euler2' 'Euler3'}, 'Bunge');

Ralf
Reply all
Reply to author
Forward
0 new messages