Skip to content

Conversation

@AbsoluteVacuum
Copy link

_fast_binary_decode:
cleanup – decreased code repetition
readout shape correction – now no need to reshape
improvement – now reads out both scalar and vector data
_text_decode:
cleanup, improvement and speedup – now using built-in numpy.loadtxt() instead of for-loops
unpack():
now loads both text and binary data, both scalars and vectors – no need for separate functions
left legacy functions for compatibility, now they are calling the new ones

_fast_binary_decode cleanup, readout shape correction and improvement
_text_decode cleanup, improvement and speedup
works on both text and binary format (prefer the binary! it is much less heavy)
works on both scalar and vector data (ouput shape is always [znodes, ynodes, xnodes, valuedim] )

How to use: 
place this file in your working folder  and use "from workingfolder import unpack"
and then use unpack("mumax-generated-file.ovf")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant