Closed Iamtheboneofmysword closed 6 months ago
Hi @Iamtheboneofmysword, that's great, thanks! It's nice to hear you're using visualpic with osiris. It's been a while since we've used osiris here, so I wasn't very confident that the reader was still working.
Could you fix the small formatting problems that flake8 is raising?
./visualpic/ui/basic_render_window.py:98:80: E501 line too long (80 > 79 characters)
./visualpic/ui/basic_render_window.py:99:80: E501 line too long (80 > 79 characters)
./visualpic/ui/controls/mpl_figure_with_draggable_points.py:36:22: E128 continuation line under-indented for visual indent
./visualpic/ui/controls/mpl_figure_with_draggable_points.py:37:22: E128 continuation line under-indented for visual indent
./visualpic/ui/controls/mpl_figure_with_draggable_points.py:38:22: E128 continuation line under-indented for visual indent
After that I'll merge the PR.
By the way, do you know how is the progress with openpmd support in OSIRIS? I was actually hoping to be able to remove the osiris data reader, since I'm not able to maintain it anymore.
Hi @AngelFP I think the flake8 checks can be passed now. I'm sorry for not sure about the progress in openpmd support in OSIRIS. Perhaps it's not a high priority, I think :(
Hi @AngelFP I think the flake8 checks can be passed now. I'm sorry for not sure about the progress in openpmd support in OSIRIS. Perhaps it's not a high priority, I think :(
No worries. Good to know in any case that the reader is still working :)
VisualPIC is such a wonderful tool to visualize 3D PIC data! Recently, I encountered some issues while using it to process my OSIRIS-3D data. I found that making the following changes can resolve them. Furthermore, I have tested the compatibility of the modified code with openPMD format data, and I believe these changes should be safe.
add_derived_field()
function invisualpic/data_handling/data_container.py
performs normally when using openPMD data, but will report the following errors thatcannot access local variable 'base_fields' where it is not associated with a value
when loading OSIRIS data. Notice that before theReuse add_derived_field
commit, theadd_derived_field()
was implemented actually within the_generate_derived_fields(self)
function, and the linederived_field_list.append(...)
would be executed only when the conditionif set(required_fields).issubset(folder_field_names):
was met. So I do the same in theadd_derived_field()
function.setup_interface():
function in thevisualpic/ui/basic_render_window.py
will reportsetRange(self, min: int, max: int): argument 1 has unexpected type 'numpy.float64'
only when using OSIRIS-3D data. And I convert the relevant variables to integer type to solve the issue.__init__
function invisualpic/ui/controls/mpl_figure_with_draggable_points.py
to solve the issue that whenever I try to edit visual properties, it reportsFigure.__init__() takes from 1 to 3 positional arguments but 9 were given
. This issue also happens when using openPMD data.I hope these small changes can help. Best regards!