The axisAngleColorKey allows to assign colors to orientations and misorientations according to rotational axes and rotational angles.
Description
The rotational angle determines the saturation of the color. The saturation increases linearly from 0 (gray) to 1 (full saturated color) within the range [0,maxAngle]
. Within the range [maxAngle,thresholdAngle]
the saturation is constant 1
. For angles large than thresholdAngle
the color is set to NaN.
The rotational axis determines the saturated color as defined in the property dirMapping
. Be default this is the @HSVDirectionKey which circles through the rainbow colors at the equator and fades to white at the north pole and black at the south pole.
If a reference orientation oriRef
is defined the disorientation angle and the disorientation axis with respect to this reference orientation is considered. If orientations are colorized the disorientation axis is considered in specimen coordinates. If misorientations are colorized the axis is in crystal coordinates.
The reference orientation may be single fixed orientation or a list of orientations. A typical application is to use as the reference orientation the mean orientation of the grain the orientation belongs to
rgb = colorKey.orientation2color(ebsd.orientations, grains(ebsd.grainId).meanOrientation)
Reference: Thomsen et al.: Quaternion-based disorientation coloring of orientation maps, 2017
Syntax
Input
CS1, CS2 | crystalSymmetry, two are only required for misorientations |
ori | orientation |
oriRef | (list of) reference orientation |
Output
rgb | list of RGB triplets |
Class Properties
dirMapping | directionColorKey |
oriRef | reference orientation |
maxAngle | misorientation angle at which the colors are maximum saturated |
thresholdAngle | misorientation angle at which colors are set to NaN |