mumaxXR contains an engine for xarray to read output directories of mumax directly, lazily into xarray. Therefore, the class OvfEngine needs to be imported from mumaxXR. Simply pass the directory, or an ovf file (e.g. m000000.ovf) as the filename_or_obj argument to the method. If only the directory is specified, the engine tries to find magnetization ovf files. If no magnetization ovf files are found the engine tries to load displacement ovf files. If neither magnetization nor displacement ovf files are found the engine just loads the first appearing type of ovf files. The engine has to be passed to xarray as engine=OvfEngine. Set chunks=’auto’ in order to parallelize loading of the ovf-files. If you want to set chunks to something else, keep in mind, that each ovf file has to be accessed multiple times, if the chunks for the dimensions x, y, z and comp are not set the default values.
from mumaxXR import OvfEngine
dataset = xr.open_dataset(example_mumax_output_dir, chunks='auto', engine=OvfEngine)
If multiple kinds of ovf files have been stored in the same time steps, another argument ‘wavetype’ can be passed to open_dataset, containing a list of the other short names, e.g.,
dataset = xr.open_dataset(path_to_example_mumax_output_dir, chunks='auto', engine=OvfEngine, wavetype=['m', 'u'])
Keep in mind that the names passed to wavetype have to be exactly like the prefix of ovf files.
If multiple simulation directories are supposed to be concatenated, multiple mumax simulation directories can be passed to the engine. If the number of ovf-files in the directories is not the same, the data is going to be interpolated lineariliy towards the time scaling, of the major mumax-directory. Please notice that this only makes sense, if the simulations did not crash or were interrupted in another way. This is meant for concatenating simulations of parameter sweeps. For 1D concatenation simply pass the parameter values inside a list to the engine.
dataset = xr.open_dataset(example_mumax_output_dir_0, chunks='auto', engine=OvfEngine, dirListToConcat=[path_to_example_mumax_output_dir_1, path_to_example_mumax_output_dir_2], sweepName='name_of_changed_parameter', sweepParam=[value_0_of_parameter, value_1_of_parameter, value_2_of_parameter])
For ND concatenation pass a list of names to sweepNames and a list of tuples to sweepParams
dataset = xr.open_dataset(example_mumax_output_dir_1, chunks='auto', engine=OvfEngine, dirListToConcat=[path_to_example_mumax_output_dir_2, path_to_example_mumax_output_dir_3, path_to_example_mumax_output_dir_4], sweepName=['name_of_changed_parameter_1', 'name_of_changed_parameter_2'], sweepParam=[(value_1_1_of_parameter, value_2_1_of_parameter), (value_1_2_of_parameter, value_2_1_of_parameter), (value_1_1_of_parameter, value_2_2_of_parameter), (value_1_2_of_parameter, value_2_2_of_parameter)])
If you want the ovf-files to be deleted after reading, set removeOvfFiles=True. This only works, if the ovf-files don’t have to be accessed multiple times. If you want to use ovf-files periodically, set useEachNthOvfFile=N. N has to be larger than one. Otherwise it is ignored. Using this flag, only each nth ovf file is used for the dataset. The singleLoad option allows you to not load all of the ovf-files but only one specific one.
Of course the wavetype option and the mumax directory concatenation can be used simultaneously.
Metadata
Release files for mumaxxr 0.0.43
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mumaxxr-0.0.43.tar.gz | 18.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mumaxxr-0.0.43-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 36.5 kB
Release files / mumaxxr-0.0.43.tar.gz
| Download URL | mumaxxr-0.0.43.tar.gz |
|---|---|
| Size | 18.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0e5bf613f8aae9061a31852ce16294b02e6ebeafb04bf2775e116d5efa0686f9
|
|
BLAKE2b-256 checksum How to use checksums |
2809c57aab51d18781c74d0a9bc898d111783ed2bccce57222852be8d44ab707
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 22, 2025.
Transparency logRelease files / mumaxxr-0.0.43-py3-none-any.whl
| Download URL | mumaxxr-0.0.43-py3-none-any.whl |
|---|---|
| Size | 17.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cce9f90f4a688094581916af37ad1af6b818534920a7e09f59956d26b1b26e5d
|
|
BLAKE2b-256 checksum How to use checksums |
ffebf12165ff4a778d27917e3d1453b3129a5a37b6f1f1608d4176440bd62558
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 22, 2025.
Transparency log