MTEX support the following formats for storing and importing of ODFs:
- .mat file - lossless, specific for MTEX, binary format
- MTEX file - lossless, specific for MTEX, ASCII format
- VPSC file - not lossless, ASCII format
- .txt file - not lossless, ASCII format
Define an Model ODF
We will demonstrate the the import and export of ODFs at the following sample ODF which is defined as the superposition of several model ODFs.
Save as .mat file
The most simplest way to store an ODF is to store the corresponding variable odf as any other MATLAB variable.
Importing a .mat file is done simply by
Export as an generic ASCII file
By default and ODF is exported in an ASCII file which consists of a large table with four columns, where the first three column describe the Euler angles of a regular 5° grid in the orientation space and the fourth column contains the value of the ODF at this specific position.
Other Euler angle conventions or other resolutions can by specified by options to export. Even more control you have, if you specify the grid in the orientation space directly.
Export an ODF to an MTEX ASCII File
Using the options MTEX the ODF is exported to an ASCII file which contains descriptions of all components of the ODF in a human readable fassion. This format can be imported by MTEX without loss.
Export to VPSC format