Inverse pole figure color change

393 views
Skip to first unread message

umut savacı

unread,
Mar 7, 2017, 3:42:43 AM3/7/17
to MTEX
Dear All 

I am working with the TEM-ACOM system and I get my data from ASTAR/nanomegas system. 

My problem is the variation of ipf color range between the astar and mtex. I would like to change the colours of ipf corners to get similar color representation between two software. I attach the ipf for same phase for two different software. As you can see from the astar data it use red-green-blue at the corners however mtex use different one like red-green-green and I want to change it to red-green-blue.

Is it possible to do that? if yes can you help me to do that.  

thanks in advance
sic 6-m.png
sic 6-m astar.PNG

Rüdiger Kilian

unread,
Mar 7, 2017, 3:50:02 AM3/7/17
to mtex...@googlegroups.com
Hi,
TSLOrientationMapping is probably what you want.
Cheers,
Rüdiger

From: mtex...@googlegroups.com [mtex...@googlegroups.com] on behalf of umut savacı [usa...@gmail.com]
Sent: Tuesday, March 07, 2017 9:41 AM
To: MTEX
Subject: {MTEX} Inverse pole figure color change

--
If you want to reduce the number of emails you get through this forum login to https://groups.google.com/forum/?fromgroups=#!forum/mtexmail, click "My membership" and select "Don't send me email updates". You can still get emails on selected topics by staring them.
---
You received this message because you are subscribed to the Google Groups "MTEX" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mtexmail+u...@googlegroups.com.
Visit this group at https://groups.google.com/group/mtexmail.
For more options, visit https://groups.google.com/d/optout.

Ralf Hielscher

unread,
Mar 7, 2017, 3:52:06 AM3/7/17
to MTEX
Hi Umut,

I thought in hexagonal symmetry the crystal directions -12-10 and -2110 are symmetrically equivalent. If this is true why do you want to colorize them with different colors? Don't you agree that symmetrically equivalent directions should be colored with the same color?

Ralf.

umut savacı

unread,
Mar 7, 2017, 4:10:17 AM3/7/17
to MTEX, ruedige...@unibas.ch
Dear Rüdiger I know that program but it is not free thats why I cannot use it. 

umut savacı

unread,
Mar 7, 2017, 4:12:04 AM3/7/17
to MTEX
Hi Ralf, you might be right but my starting point is to get the same ipf key for both softwares. I do not know why astar gives that color scheme if both directions are symmetrical. 

Ralf Hielscher

unread,
Mar 7, 2017, 4:24:24 AM3/7/17
to MTEX
Rüdiger means you can do


oM = TSLOrientationMapping(ebsd('phaseName'))

plot
(oM)

plot
(ebsd('phaseName'),oM.orientation2color(ebsd('phaseName').orientation)


Though in the long term I would suggest to work with a correct color map.

Ralf.

umut savacı

unread,
Mar 7, 2017, 4:28:09 AM3/7/17
to MTEX
Hi Ralf 

Maybe I should change my question, is it possible to change the limits of ipf to (0003) (-2-1-10) (11-20)  instead of standart (0001) (-2110) (-12-10) ?


On Tuesday, March 7, 2017 at 10:52:06 AM UTC+2, Ralf Hielscher wrote:

Ralf Hielscher

unread,
Mar 7, 2017, 4:42:08 AM3/7/17
to mtex...@googlegroups.com
Is there any reason in doing so? You may label the vertices of the sector with what ever you want.

use 'noLabel' to suppress the default labels and the command "annotate" to add the labels of your choice.

Ralf.






********************************************************************
Ralf Hielscher                   Tel: +371-531-38556
Fakultät für Mathematik               +371-531-22200 (Sekr.)
Technische Universität Chemnitz  Fax: +371-531-22109
Reichenhainer Str. 39            E-mail: ralf.hi...@mathematik.tu-chemnitz.de
D-09126 Chemnitz                 http://www.tu-chemnitz.de/~rahi
********************************************************************

--
If you want to reduce the number of emails you get through this forum login to https://groups.google.com/forum/?fromgroups=#!forum/mtexmail, click "My membership" and select "Don't send me email updates". You can still get emails on selected topics by staring them.
---
You received this message because you are subscribed to the Google Groups "MTEX" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mtexmail+unsubscribe@googlegroups.com.

umut savacı

unread,
Mar 7, 2017, 5:16:20 AM3/7/17
to mtex...@googlegroups.com
Dear Ralf that one gives similar color key thanks but the second part did not worked for me it gives an error given below.

the orientation map is now same  with the ASTAR. 

does it have any side effect, working in this fashion?

what do you mean the correct color map? isn't it correct ?

ruediger Kilian

unread,
Mar 7, 2017, 5:21:39 AM3/7/17
to mtex...@googlegroups.com
Hi,
it’s ebsd(‘phase').orientations
and don’t hesitate to have a look at:
https://mtex-toolbox.github.io/files/doc/ColorCodingEBSD_demo.html
Rüdiger


On 07 Mar 2017, at 11:16 am, umut savacı <usa...@gmail.com> wrote:

> Dear Ralf that one gives similar color key thanks but the second part did not worked for me it gives an error given below. I cannot draw the orientation map with that color key.
>
> plot(ebsd('sic'),oM.orientation2color(ebsd('sic').orientation))
> No appropriate method, property, or field 'orientation' for class 'EBSD'.
>
> Error in EBSD/subsref (line 32)
> [varargout{1:nargout}] = builtin('subsref',ebsd,s);
>
> On Tuesday, March 7, 2017 at 11:24:24 AM UTC+2, Ralf Hielscher wrote:
> Rüdiger means you can do
>
>
> oM = TSLOrientationMapping(ebsd('phaseName'))
>
> plot(oM)
>
> plot(ebsd('phaseName'),oM.orientation2color(ebsd('phaseName').orientation)
>
>
> Though in the long term I would suggest to work with a correct color map.
>
> Ralf.
>
>
>
> On Tuesday, March 7, 2017 at 10:12:04 AM UTC+1, umut savacı wrote:
> Hi Ralf, you might be right but my starting point is to get the same ipf key for both softwares. I do not know why astar gives that color scheme if both directions are symmetrical.
>
> On Tuesday, March 7, 2017 at 10:52:06 AM UTC+2, Ralf Hielscher wrote:
> Hi Umut,
>
> I thought in hexagonal symmetry the crystal directions -12-10 and -2110 are symmetrically equivalent. If this is true why do you want to colorize them with different colors? Don't you agree that symmetrically equivalent directions should be colored with the same color?
>
> Ralf.
>
> On Tuesday, March 7, 2017 at 9:42:43 AM UTC+1, umut savacı wrote:
> Dear All
>
> I am working with the TEM-ACOM system and I get my data from ASTAR/nanomegas system.
>
> My problem is the variation of ipf color range between the astar and mtex. I would like to change the colours of ipf corners to get similar color representation between two software. I attach the ipf for same phase for two different software. As you can see from the astar data it use red-green-blue at the corners however mtex use different one like red-green-green and I want to change it to red-green-blue.
>
> Is it possible to do that? if yes can you help me to do that.
>
> thanks in advance
>
> --
> If you want to reduce the number of emails you get through this forum login to https://groups.google.com/forum/?fromgroups=#!forum/mtexmail, click "My membership" and select "Don't send me email updates". You can still get emails on selected topics by staring them.
> ---
> You received this message because you are subscribed to the Google Groups "MTEX" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to mtexmail+u...@googlegroups.com.

umut savacı

unread,
Mar 7, 2017, 5:22:30 AM3/7/17
to MTEX, ralf.hi...@mathematik.tu-chemnitz.de
the reason is astar color key. I want to get the same/similar ipf color key and same/similar orientation map results with astar. 

I did not understand the second part actually. you mean can I add  (0003) (-2-1-10) (11-20) labels to the ipf in correct position? 

additionally in the mtex color key indices are in (hkil) order? 

sorry for my lots of questions I am trying to learn this on my own and this place is the only place for my questions
To unsubscribe from this group and stop receiving emails from it, send an email to mtexmail+u...@googlegroups.com.

umut savacı

unread,
Mar 7, 2017, 6:15:03 AM3/7/17
to MTEX, ruedige...@unibas.ch
Dear Ruediger

Thanks for the tip

I am triyng to draw everything in one image I write 
oM1 = TSLOrientationMapping(ebsd('sic'))
oM2 = TSLOrientationMapping(ebsd('bn'))

plot(ebsd('bn'),oM2.orientation2color(ebsd('bn').orientations))
hold on 
plot(ebsd('sic'),oM1.orientation2color(ebsd('sic').orientations))
hold off

then it gives: 
Warning: Not a topological correct colormap! Green to blue colorjumps possible 
> In TSLOrientationMapping/h2color (line 32)
  In ipdfHSVOrientationMapping/Miller2color (line 17)
  In ipdfOrientationMapping/orientation2color (line 83) 

it give the same error if I want to plot oM1 however it does not give error in plotting oM2 

additionally if I plot the orientation map with the above code whenever I click to bn region it gives all the data at that point but in sic region it says no data. 

ruediger Kilian

unread,
Mar 7, 2017, 6:23:52 AM3/7/17
to mtex...@googlegroups.com
Actually, if you read carefully,Most it is not an error but a warning, telling you that the colormap you decided to use is topologically not correct.
Just do a plot(oM,’3d’) and have a look at the issue. There’s a very nice paper by Nolze&Hielscher you can find on the mtex homepage that will answer your questions with respect to that.
Cheers,
Rüdiger

ruediger Kilian

unread,
Mar 7, 2017, 6:46:01 AM3/7/17
to mtex...@googlegroups.com
Hello again,
the "no data” can be worked around with composting one vector of all colors for all phases and plotting it all at once:

idp=ebsd.indexedPhasesId;
col=zeros(length(ebsd('indexed')),3);
for i=1:length(idp)
om=ipdfHSVOrientationMapping(ebsd(ebsd.phaseId == idp(i)).CS);
col(ebsd('indexed').phaseId == idp(i),:)=om.orientation2color(ebsd(ebsd.phaseId == idp(i)).orientations);
end

plot(ebsd('indexed'),col)

Maybe adapt it to your needs.

Cheers,
Rüdiger
Reply all
Reply to author
Forward
0 new messages