Closed kilir closed 9 years ago
Hi Rüdiger,
this is a nice example to check colorcoding. I will do so and report my results.
Ralf.
Hi Rüdiger,
I did some experiments with your data. This is what I came up with:
some remarks:
[h,k,l]
being the crystal representation of a axis sym * [h,k,l]
is also a valid representation. Assume the crystal has orientation ori then in order to go back to specimen coordinates we have to do ori * [h,k,l]
or if the other variant was chosen ori * sym^-1 * sym * [h,k,l]
, hence, the symmetry cancels out. But this also mean we have to know which sym
we used to found the axis of minimum rotation.antipodal
is not needed. axis(ori1,ori2)
with axis(ori2,ori1)
this exactly changes the direction of the rotation axis. To overcome this I but in ori1
always the the orientation with the smaller grainId
. In future MTEX releases I might sort the values in ebsdId
always like this. As a consequence the the colors at the boundaries look quite smooth which was not the case without the ordering.antipodal
. However, there the colormap is not so nice.I will uploaded a new MTEX version 4.0.22 which fixes orientation/axis
function.
That's all quite difficult :)
Ralf.
PS: the code I used:
mori = inv(gbo1).*gbo2;
misor_ax_sample = axis(gbo1,gbo2);
% change sign according to the sorting of the grains
ind = gb.grainId(:,1) > gb.grainId(:,2);
misor_ax_sample(ind) = -misor_ax_sample(ind);
%make a nice oM for sample ref. frame
oMs = ipdfHSVOrientationMapping(crystalSymmetry('1'));
figure
plot(ebsd('Q'),oMC.orientation2color(ebsd('Q').orientations))
hold on
plot(gb,'Linecolor','k','linewidth',8)
hold on
plot(gb,oMs.Miller2color(misor_ax_sample),'linewidth',4)
hold off
figure
plot(oMs)
hold on
plot(misor_ax_sample,mori.angle./degree,'MarkerSize',8,'MarkerEdgeColor','k')
hold off
colorbar(gcm)
Hi Ralf, thanks a lot for looking into it. I see that the direction of axis or sense of rotation depends on whether going from A to B or B to A. However, does anybody know of a physical meaning as it simply depends on the way the orientations are sampled. In other words, would there be any need to plot upper and lower for the axes wrt to sample reference frame? As an effect of the close to 60 degree rotation for the axis of grain 1 and 4, the axes flip between upper and lower hemisphere, however using the "beach ball" colorcoding, that wouldn't be noticed.
oMs = ipdfHSVOrientationMapping(crystalSymmetry('1'));
oMs.CS1=oMs.CS1.Laue
oMs.whiteCenter = vector3d(0,-1,0)
oMs.colorStretching =1
oMs.colorPostRotation = reflection(vector3d(-1,0,-))*rotation('axis',vector3d(1,0,0),'angle',180*degree);
figure
plot(ebsd('Q'),ebsd('Q').orientations);
hold on
plot(gb,'Linecolor','k','linewidth',8)
hold on
plot(gb,oMs.Miller2color(misor_ax_sample),'linewidth',4)
hold off
figure
plot(oMs)
hold on
plot(misor_ax_sample,mori.angle./degree,'MarkerSize',8,'MarkerEdgeColor','k','antipodal')
hold off
c = colorbar(gcm);
ylabel(c,'misor angle')
gives again the same results like 4.0.15 did, which is great and gives the correct result, testing it on an synthetic sample. (sorting of grains might actually not be required, at least not for the present example, but I guess it's a good idea). The only situation where color jumps could occur now, are for boundaries with axes at the very periphery.
Colorcoding and axes wrt to sample reference frame:
Map of misor axes wrt to sample ref. frame:
All the best, Rüdiger
Hi Rüdiger,
I'm a bit unsure - is this issue fixed now? Can I close it? I found two more bugs in misorientation calculations which I fixed in mtex-4.1.beta6.
Ralf.
Hello Ralf, consider it as resolved. As described above, color jumps are omitted, however one has to be happy with looking at a topologically incorrect color coding - just one half-sphere- but that's fine with me. All the best, Rüdiger
Hi Rüdiger,
I looked at it one again. The main problem is indeed that there is no jump free color key for axes. You could do something like this
oMs = ipdfHSVOrientationMapping(crystalSymmetry('-1'));
oMs.maxAngle = pi/2;
This key has no jumps, but all points at the equator gets the same color -> black.
May be this can even improved further by introducing some gray at the equator - but it will never be perfect.
Ralf.
Hello Ralf, in short: determination of misorientation axes with 4.0.20 does not yield the same as with 4.0.15 and the those from 4.0.15 seem to make more sense to me.
In longer: When colorcoding grain boundaries according to their misorientation axis I noticed that with 4.0.20 some axis directions (wrt to sample reference frame) were determined differently on the same boundary, e.g. for vertical or horizontal segments. The difference seems not to be related with polarity of the vector3d of the misorientation axis wrt to the sample reference frame. Misorientation axes in crystal reference frame are identical. There are 11 boundareis with angles misorientation angles high enough that they do not scatter to much. With 4.0.15 I can find those 11 clusters in the polefigure for misorienatioon axes (wrt sample reference frame) while in 4.0.20, there are more then 11, coincident with the additional colors of boundaries as seen on the map. This wasn't an issue with 4.0.15 and I could not find the commit which might be the reason for it. Attached are sample code as well as a maps and pole figure of misorientation axes obtained with 4.0.20 and 4.0.15.
With 4.0.20 Misorientation axes (sample reference frame) mapped and orientation map. Boundary colorcoding according to the "beach ball" below. Note color jumping along grain boundary segments.![misor_axes_sample_map](https://cloud.githubusercontent.com/assets/11697557/7709894/64de01c6-fe60-11e4-9837-6ad7d9c9ca21.png)
Misorientation axes (sample reference frame) and oM used to colorcode boundaries above. Markers colorcoded by misorientation angle. (Note, there are more clusters of points than boundaries),![misor_axes_sample](https://cloud.githubusercontent.com/assets/11697557/7709871/3a242ed8-fe60-11e4-8935-c9e305ad0034.png)
Misorientation axes (crystal reference frame) mapped and orientation map. Boundary colorcoding according to the "piece of pie" below.![misor_axes_crystal_map](https://cloud.githubusercontent.com/assets/11697557/7709929/a5065b86-fe60-11e4-8c09-c32b4a7f1da3.png)
Misorientation axes (crystal reference frame) and oM used to colorcode boundaries above.![misor_axes_crystal](https://cloud.githubusercontent.com/assets/11697557/7709930/a51bf6e4-fe60-11e4-91eb-faff404f4eba.png)
With 4.0.15 Misorientation axes (sample reference frame) mapped and orientation map. Boundary colorcoding according to the "beach ball" below.![misor_axes_sample_map_mtex0 15](https://cloud.githubusercontent.com/assets/11697557/7709901/6d06b082-fe60-11e4-8a0b-99551e838f83.png)
Misorientation axes (sample reference frame) and oM used to colorcode boundaries above.Markers colorcoded by misorientation angle.![misor_axes_sample_mtex0 15](https://cloud.githubusercontent.com/assets/11697557/7709872/3a25d29c-fe60-11e4-8227-22b7192e0300.png)
Misorientation axes (crystal reference frame) mapped and orientation map. Boundary colorcoding according to the "piece of pie" below.![misor_axes_crystal_map_mtex0 15](https://cloud.githubusercontent.com/assets/11697557/7709991/1b5732b0-fe61-11e4-8ead-8631875f3c69.png)
Misorientation axes (crystal reference frame) and oM used to colorcode boundaries above.![misor_axes_crystal_mtex0 15](https://cloud.githubusercontent.com/assets/11697557/7709992/1b58201c-fe61-11e4-94f6-f2227b525fc9.png)
The input can be found here: https://bitbucket.org/kiliru/stuff/downloads/test_ebsd.mat and this is the code I used with 4.0.20
while this is the script used with 4.0.15. with the only difference using
Do you have any idea, what is going wrong? All the best, Rüdiger