the default MTEX inverse pole figure colour key
Syntax
key = ipfHSVKey(cs)
key.ipfDirection = xvector
rgb = key.orientation2color(ori)
key.plot()
Description
Crystal directions are coloured with HSVDirectionKey: primary colours identify the vertices of the fundamental sector and its centre is white. A finite maxAngle concentrates the colour variation around whiteCenter. Set ipfDirection to the specimen direction whose crystal alignment you want to display.
Input
x |
crystalFrame, orientation, or single-phase EBSD or grain data |
ipfDirection |
vector3d specimen direction; default zvector |
kwargs |
HSVDirectionKey options, including maxAngle, whiteCenter and perceptual |
Output
key |
ipfHSVKey |
Properties
ipfDirection |
specimen direction used for the inverse pole figure |
maxAngle |
angular radius in radians used for a concentrated colour key |
whiteCenter |
crystal direction assigned white |
Example
Choose specimen Z as the colouring direction, then colour three orientations and plot the matching key and inverse poles. All inputs are constructed here; no EBSD file is needed.
import numpy as np
import matplotlib.pyplot as plt
from mtex import crystalFrame, orientation, ipfHSVKey, vector3d, degree, plotIPF
cs = crystalFrame('m-3m')
ori = orientation.byEuler(np.array([[0, 0, 0], [25, 35, 15], [60, 50, 30]])*degree, cs)
key = ipfHSVKey(cs)
key.ipfDirection = vector3d.Z
rgb = key.orientation2color(ori)
print('RGB colours:', np.round(rgb, 3))
key.plot()
plotIPF(ori, rgb, vector3d.Z, all=True, markerSize=10)
plt.show()
The first figure is the colour key; the second places the same colours at the crystal directions parallel to specimen Z. Changing ipfDirection changes which crystal direction is coloured.
RGB colours: [[1. 0.01 0. ]
[0.748 0.922 0.737]
[0.076 0.749 0.993]]


See also
ipfColorKey, HSVDirectionKey, ipfTSLKey, ipfHKLKey
Members
| maxAngle | the sharpness and the white centre live on the direction key and are set through it |
| whiteCenter | the white centre of the key, a crystal direction |
Used on
QuasiCrystals, EBSDIPFMap, EBSDPerceptualKey, EBSDSharpPlot, GND
MATLAB’s ipfHSVKey
source
Citing this page.
This page is part of the documentation of
MTEX, a free and open
source MATLAB toolbox for analyzing and modeling crystallographic textures.
It was written by The MTEX Developers and is published at
https://mtex-toolbox.github.io/ipfHSVKey_py.html.
If you use MTEX, or reuse text or figures from this page, in your research,
please cite
F. Bachmann, R. Hielscher, H. Schaeben: Texture Analysis with MTEX - Free and Open Source Software Toolbox, Solid State Phenomena 160 (2010), 63-68. 10.4028/www.scientific.net/SSP.160.63
BibTeX
@article{bachmann2010mtex,
author = {F. Bachmann and R. Hielscher and H. Schaeben},
title = {Texture Analysis with MTEX - Free and Open Source Software Toolbox},
journal = {Solid State Phenomena},
volume = {160},
pages = {63-68},
year = {2010},
doi = {10.4028/www.scientific.net/SSP.160.63},
url = {https://doi.org/10.4028/www.scientific.net/SSP.160.63}
}
Other papers describing specific MTEX methods are listed under Publications — please cite the one that best fits your application. The MTEX source code is licensed under the GNU General Public License v2.0; the text and figures of this documentation are licensed under CC BY 4.0, which permits reuse — including by automated systems — provided The MTEX Developers and this page are credited.