the sample data of the documentation, read from the data repository
Syntax
mtexdata()
The table of the data sets.
ebsd = mtexdata('forsterite')
A map, read with the recipe its page uses.
pf = mtexdata('dubna')
Pole figures, with their directions and coefficients.
ebsd = mtexdata('forsterite', root=mtexDataPath(), download=False)
From the local folder only.
Description
The files are fetched from the data repository mtex-toolbox/mtex-data on first use and kept under getMTEXpref(‘mtexDataPath’), MTEX_DATA or ~/.mtex/data; root names another folder, a local copy of MTEX’s data folder for instance. Every data set is read as its documentation page does, in the plotting convention of the session: a page that wants a particular alignment sets it itself. mtexdatafile gives the files without reading them.
Input
name |
the name of the data set, case does not matter |
Keywords
| keyword | default | description |
|---|---|---|
root |
None |
the folder the files are kept in, instead of mtexDataPath() |
download |
True |
fetch a missing file; False raises instead |
verbose |
True |
report a download, its source and where the file is kept; False is MATLAB’s silent |
Output
ebsd |
EBSD, grain2d, PoleFigure, EBSD3, SO3Fun, S2Fun or tensor, by the data set; the table of the data sets without a name |
Example
Load the small, cropped Forsterite data set, inspect its phases, and draw a single-phase orientation map. Missing files are downloaded once and cached in the configured data directory.
import matplotlib.pyplot as plt
from mtex import mtexdata, mtexdatafile, plot
ebsd = mtexdata('small', verbose=False)
print(ebsd)
phase = ebsd['Forsterite']
print('Selected Forsterite pixels:', phase.size)
plot(phase, phase.orientations)
filename = mtexdatafile('forsterite', download=False)
print('Cached file extension:', filename.rsplit('.', 1)[-1])
plt.show()
mtexdata returns a loaded object using the sample recipe. mtexdatafile returns the path to its underlying file, before cropping or applying that recipe. The small sample and the full Forsterite sample share this file; download=False requires it to be cached already.
EBSD (y↓→x)
size: 3721
Phase Orientations Mineral Color Symmetry Crystal reference frame
0 1197 (32%) notIndexed
1 1952 (52%) Forsterite LightSkyBlue mmm Forsterite
2 290 (7.8%) Enstatite DarkSeaGreen mmm Enstatite
3 282 (7.6%) Diopside Goldenrod 12/m1 Diopside
properties : bands, bc, bs, error, mad
scan unit : um
X × Y : [3.3e+04 → 3.6e+04] × [4500 → 7500]
square lattice: spacing 50
Selected Forsterite pixels: 1952
Cached file extension: ctf

See also
mtexdatafile, loadEBSD, loadPoleFigure
Used on
CrystalOperations, CrystalShapes, OrientationFundamentalRegion, EBSD3Analysis, EBSD3Plotting, EBSD2ODF, EBSDAdvancedMaps, EBSDDenoising, EBSDExport, EBSDFilling, EBSDGROD, EBSDGrid
MATLAB’s mtexdata
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/mtexdata_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.