Skip to main content

micromagnetic post processing library

Project description

Pyzfn

A micromagnetic post processing library for the data generated by amumax, a fork of mumax3.

Wrapper around zarr.hierarchy.Group from zarr to implement convenience functions that work with the ouput of a modified mumax3.

Installation

pip install pyzfn

Usage

90 % of the functionnalities are provided by zarr, please refer to that documentation extensively.

from pyzfn import Pyzfn

job = Pyzfn("path/to/job.zarr")

# Use this extensively
job.pp # pretty print the data tree with a widget
job.p # not pretty print, but does not need a widget

# Getting simulation metadata:
# json file located at path/to/job.zarr/.attrs
# You can acces it like a python dict:
dx = job.attrs["dx"]
# or as a class attribute (given that you have no dataset named similarly):
dx = job.dx

# Get data you saved in amumax:
# Ex: the x component of the magnetization for all cells for 10 <= t < 20
#             t  ,z,y,x,c
mag = job.m[10:20,:,:,:,0] # mag is a number array

# This will not load the data
mag_dst = job.m
# You need to slice it to obtain the numpy array
arr = mag_dst[:]

# Some very useful info
mag_dst.info

# Reminder that the `help` and `dir` functions in python exist:
help(mag_dst)

# The following is not from zarr, they are convenient (somewhat optimized) post processing functions
job.calc_disp()
job.calc_modes()

# Data visualization:
job.snapshot() # visualize data for a specific t
job.ispec() # interactive fft spectra

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyzfn-0.1.10.tar.gz (50.3 kB view details)

Uploaded Source

Built Distribution

pyzfn-0.1.10-py3-none-any.whl (38.3 kB view details)

Uploaded Python 3

File details

Details for the file pyzfn-0.1.10.tar.gz.

File metadata

  • Download URL: pyzfn-0.1.10.tar.gz
  • Upload date:
  • Size: 50.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for pyzfn-0.1.10.tar.gz
Algorithm Hash digest
SHA256 0c76cf0945959d3a893146c9f5d351279c60cf2163d148c4b20adaecb7797703
MD5 cdc5e8565f0584c37a1061e91ab6d8b8
BLAKE2b-256 6d69492f01b2af3abcdd3a6632526d8cb0268fb55fbd1fcb44a187a9b5726b47

See more details on using hashes here.

File details

Details for the file pyzfn-0.1.10-py3-none-any.whl.

File metadata

  • Download URL: pyzfn-0.1.10-py3-none-any.whl
  • Upload date:
  • Size: 38.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for pyzfn-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 cef707984d14f6143aa9593a7438149337e16041f7d0ad2191e8bf906439f86c
MD5 95372f67840f40ac8a9b5599899b2325
BLAKE2b-256 52af8df3e37e0aeec78e35bf5c6705498bbb9cbfc7c7a080bbb7f8a5ab7fd8af

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page