ChristopherMayes / openPMD-beamphysics

Tools for analyzing and viewing particle data in the openPMD standard, extension beamphysics.
https://christophermayes.github.io/openPMD-beamphysics/
Apache License 2.0
17 stars 15 forks source link

Adding test functions #82

Closed ColwynGulliford closed 2 weeks ago

ColwynGulliford commented 4 weeks ago

This file PR brings in functions for loading 3D CST data into a FieldMesh object as well as helper functions for checking that associated fields in the FieldMesh object satisfy Maxwell's equations.

This functionality was tested on 3 examples: 3D field map data from CST for the Cornell DC gun, 3D data for a 975 MHz kicker cavity from CERN, 3D field data for the Fermilab 7 cell accelerating cavity.

In addition, the helper functions were tested with the Cornell injector solenoid 2D map and a 2D 7 Cell Cornell MLC cavity map.

ChristopherMayes commented 3 weeks ago

The functions need docstrings

ColwynGulliford commented 3 weeks ago

The functions need docstrings

Added!

ChristopherMayes commented 3 weeks ago

Remove the unchanged notebooks

ColwynGulliford commented 3 weeks ago

Remove the unchanged notebooks

Done.

ChristopherMayes commented 3 weeks ago

[pmd_beamphysics/fields/analysis.py:726](http://localhost:8888/lab/tree/docs/examples/fields/pmd_beamphysics/fields/analysis.py#line=725): SyntaxWarning: invalid escape sequence '\D' ax2.set_ylabel("$\Delta$ " + units)