CrystalMap.get_map_data(item: str | ndarray, decimals: int | None = None, fill_value: int | float | None = nan) ndarray[source]#

Return an array of a class instance attribute, with values equal to False in self.is_in_data set to fill_value, of map data shape.


Name of the class instance attribute or a numpy.ndarray.


Number of decimals to round data point values to. If not given, no rounding is done.


Value to fill points not in the data with. Default is numpy.nan.


Array of the class instance attribute with points not in data set to fill_value, of float data type.


Rotations and orientations should be accessed via rotations and orientations.

If item is "orientations" or "rotations" and there are multiple rotations per point, only the first rotation is used. Rotations are returned as Euler angles.


>>> 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

>>> iq = xmap.get_map_data("iq")
>>> iq.shape
(100, 117)