get_map_data#
- CrystalMap.get_map_data(item: Union[str, ndarray], decimals: Optional[int] = None, fill_value: Optional[Union[int, float]] = nan) ndarray[source]#
Return an array of a class instance attribute, with values equal to
Falseinself.is_in_dataset tofill_value, of map data shape.- Parameters:
- item
Name of the class instance attribute or a
numpy.ndarray.- decimals
Number of decimals to round data point values to. If not given, no rounding is done.
- fill_value
Value to fill points not in the data with. Default is
numpy.nan.
- Returns:
output_arrayArray of the class instance attribute with points not in data set to
fill_value, of float data type.
Notes
Rotations and orientations should be accessed via
rotationsandorientations.If
itemis"orientations"or"rotations"and there are multiple rotations per point, only the first rotation is used. Rotations are returned as Euler angles.Examples
>>> from orix import data >>> xmap = data.sdss_ferrite_austenite(allow_download=True) >>> xmap Phase Orientations Name Space group Point group Proper point group Color 1 5657 (48.4%) austenite None 432 432 tab:blue 2 6043 (51.6%) ferrite None 432 432 tab:orange Properties: iq, dp Scan unit: um >>> xmap.shape (100, 117)
Get a 2D map in the correct shape of any attribute, ready for plotting
>>> xmap.iq.shape (11700,) >>> iq = xmap.get_map_data("iq") >>> iq.shape (100, 117)