ubermagtable.util.data#
- ubermagtable.util.data(filename)#
Extracts numerical data from a table file.
- Parameters:
filename (str) – OOMMF
.odt
or mumax3.txt
file.- Returns:
List of numerical data.
- Return type:
list
Examples
Reading data from an OOMMF
.odt
file.
>>> import os >>> import ubermagtable.util as uu ... >>> odtfile = os.path.join(os.path.dirname(__file__), '..', ... 'tests', 'test_sample', 'oommf-new-file3.odt') >>> uu.data(odtfile) [...]
Reading data from a mumax3
.txt
file.
>>> odtfile = os.path.join(os.path.dirname(__file__), '..', ... 'tests', 'test_sample', 'mumax3-file1.txt') >>> uu.data(odtfile) [...]