grahamrow / Muview2

3D visualization of micromagnetic simulation data from Mumax or OOMMF
GNU General Public License v2.0
41 stars 8 forks source link

Not opening an OVF 1.0 file #25

Closed jufiba closed 7 years ago

jufiba commented 7 years ago

Hi to all,

I have been writing a plugin in Fiji to output OVF 1.0 (Data 4 or Data 8 binary version) from XMCD photoemission microscopy or spin-polarized low-energy electron microscopy images writeOVF. The resulting OVF files look ok, and can be read into MuMax3, or converted with ovf2vtk.

But Muview2 chokes on them with a

Expected 'End Segment'

error, and stops reading the rest of the data. A example file that gives this problem can be found here.

Any help would be appreciated.

Best, Juan

grahamrow commented 7 years ago

Hi Juan,

This sounds like an interesting application, thanks for giving Muview a whirl. Interestingly, I don't see any errors when I open the file, though the data doesn't look correct. screen shot 2017-01-05 at 10 07 29 am

When I load in mmDIsp from OOMMF I get slightly confusing bounding box: screen shot 2017-01-05 at 10 36 54 am

This may be because the header info seems wrong, and inconsistent with the number of nodes and cell size:

# xbase: 5
# ybase: 5
# zbase: 3
# xstepsize: 8.46
# ystepsize: 8.46
# zstepsize: 8.46
# xnodes:475
# ynodes:458
# znodes: 1
# xmin: 0
# ymin: 0
# zmin: 0
# xmax: 10000
# ymax: 10000
# zmax: 6e-09

Which platform are you running on (I'm guessing windows), and which version of Muview? Release 2.1.2 shouldn't return the error message you've mentioned — the requirement for "end segment" was dropped in d095fd37

Also, do you have the option to dump an ASCII version of the text instead?

I'll keep looking into this — because of some upcoming projects I'll actually have some time to spend on Muview in the near future. Keep me posted...

Best, Graham

grahamrow commented 7 years ago

Quick follow up: saving from mmDisp and I get the expected results: screen shot 2017-01-05 at 10 57 04 am

The culprit seems to be the lack of spaces in

# xnodes:475
# ynodes:458
# znodes: 1

I will plan on making muview ignore spaces here since the spec does say "Case is ignored, and all space and tab characters are eliminated".

Even when this works, it takes forever to zoom out since I hadn't designed Muview to accommodate such huge spatial extents. Also, the vector magnitudes aren't currently reflected — I'll be getting to these issues as well.

Best, Graham

jufiba commented 7 years ago

Thanks a lot.

I just modified the plugin so it puts an space in the xnodes and ynodes. It is also true I did not really try to use a proper bounding box.

For the record, I am using the precompiled MuView 2.1 in Ubuntu 16.04 LTS (64bits).

Best, Juan