-
Hi everybody, Trying to import custom 2D geometry using MWE:
This produces a blank plot (no geometry). I've uploaded the source hdf5 file here. It is simply a cylinder of radius I've tried both I've confirmed that the file contains the expected geometry/dielectric values by visualizing with jupyterlab-h5web. I am just becoming familiar with hdf5 files, but I suspect the issue may be in the "structure" of the file: when I visualize using jupyterlab-h5web, I see a root and a child; perhaps this is in conflict with MEEP's guidance of being the "first/only" dataset in the file. I'll also mention that if I give the Looking forward to your inputs. Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
The issue persists even when I generate an .h5 file from MEEP geometry. MWE is below and notebook with outputs is here.
|
Beta Was this translation helpful? Give feedback.
-
I think the issue is with the formatting of your HDF5 file. As a test, I used h5utils and was not able to read it:
Can you try creating your HDF5 file using h5py? |
Beta Was this translation helpful? Give feedback.
-
Looks like a bug in #1827 whereby loading the geometry via the
With this change, the simulation output does show that the HDF5 file was successfully read.
Thanks for catching this. Will try to post a fix soon. In the meantime, the workaround is quite straightforward. |
Beta Was this translation helpful? Give feedback.
Looks like a bug in #1827 whereby loading the geometry via the
epsilon_input_file
feature still requires you to manually initialize themeep.Simulation
object before invokingplot2D
.With this change, the simulation output does show that the HDF5 file was successfully read.