This notebook is part of the kikuchipy
documentation https://kikuchipy.org.
Links to the documentation won't work from the notebook.
This example shows how to save a master pattern in the stereographic projection without a background to file.
%matplotlib inline
import kikuchipy as kp
import matplotlib.pyplot as plt
import numpy as np
from skimage.color import gray2rgba
mp = kp.data.nickel_ebsd_master_pattern_small(
projection="stereographic",
energy=20,
hemisphere="north"
)
mp.rescale_intensity(out_range=np.float32)
data = gray2rgba(mp.data)
mask = data[..., 0] == 0
data[mask, -1] = 0
plt.figure()
plt.imshow(data)
plt.axis("off");
#plt.imsave("masterpattern.png", arr=data, cmap="gray")