1.0.0: Breaking changes in the API
This version introduces major changes and breaks backward compatibility.
Here is a list of the changes:
- The import statement now uses
openpmd_viewer
instead ofopmd_viewer
, e.g.
from openpmd_viewer import OpenPMDTimeSeries
- For consistency,
ts.get_particle
now return particle positions in meters,
instead of microns. For instance, in the code below,x
,y
,z
will be in
meters
x, y, z = ts.get_particle(['x', 'y', 'z'], iteration=1000)
- In
ts.get_field
, slicing can now be done in several directions, and for
1d, 2d, 3d, and circ geometries. As a consequence, this breaks backward
compatibility for 3d field:
get_field(field=field, coord=coord, iteration=iteration)
used to return the central slice alongy
while it now returns the full 3d field.
In addition, the name of the argument ofget_field
that triggers slicing
has been changed fromslicing_dir
toslice_across
(andslicing
has been
changed toslice_relative_position
). openPMD-viewer
does not rely on Cython anymore. Instead, it usesnumba
for functions that perform a substantial amount of computation.- A new function (
ts.iterate
) was introduced in order to quickly apply a
given function to all iterations of a time series. See the docstring of
ts.iterate
for more information. - The function
get_laser_envelope
does not support the argumentindex
anymore
(which was effectively used in order to perform slicing). Instead, users should use
the argumentslicing_dir
. In addition,get_laser_envelope
now supports the
argumentplot_range
. - The function
get_laser_waist
does not support the agumentslicing_dir
anymore.