Closed RemiLehe closed 4 years ago
Hi Remi, thanks a lot for this PR and sorry for the late reply, I just came back from vacation. I will test this as soon as I can with the 3d visualization and see if any more changes are needed.
Great, thanks! Let me know if you have any question in the process of doing so.
Note that the above mentioned openPMD-viewer PR has been merged, but you will still need to use the dev
branch of openPMD-viewer
. (i.e. when doing pip install openPMD-viewer
, you will not have the required feature - we are planning to release it soon, though)
Hi Remi,
Just commenting in this old PR because the features that this would add are now finally implemented in the new branch general_redesign
. Adding support for quasi3D data in the current dev
or master
branches would have required lots of work also on the 3D visualizer and other components, so I instead focused on making sure this is supported in the new VisualPIC redesign.
If you want to check it out, there is now an example here on how to visualize the 3D fields which actually uses data in thetaMode
geometry. Also, the render on top of the README.md is made from FBPIC data, so it works quite well!
Awesome! I just tried the example and it worked really well out of the box! Thanks a lot for developing this ; I looks very useful and easy to use!
Since the current PR seems to be obsolete now, I'll close it.
Happy to hear that it worked! The implementation for openPMD data was initially quite straightforward, but I had to end up making a custom version of the read_field_circ
method from openPMD-viewer
in order to add the option to limit the resolution of the 3D reconstructed fields. Otherwise for high-resolution simulations it was too slow and heavy on the memory. You can see this in the field readers. Once I polish the code a bit more I might make a PR with this addition to openPMD-viewer
.
Awesome! Yes, that would certainly be handy in openPMD-viewer
.
Excellent point, I noted something similar in potential re-construction helpers for openPMD-api (lazily-evaluated access to toCylindrical()[:, :, :]
and toCartesian()[:, :, :]
index operators or similar): https://github.com/openPMD/openPMD-api/blob/0.11.1-alpha/examples/2a_read_thetaMode_serial.py
This PR adds rudimentary support for quasi-3D openPMD data. Important: this requires this openPMD-viewer pull request to be merged.
More specifically, the function
_ReadAllFieldData
now uses the argumenttheta=None
for openPMD-viewer'sget_field
, which returns the full 3D cartesian field.In addition, I added code to extract the shape of the fields without having to read the full field. The code is not very pretty, but I think it works.