:snake: Python visualization tools for openPMD files
%matplotlib widget
by default by @BenWibking in https://github.com/openPMD/openPMD-viewer/pull/407
Full Changelog: https://github.com/openPMD/openPMD-viewer/compare/1.9.0...1.10.0
t
, choose the closest iteration by @RemiLehe in https://github.com/openPMD/openPMD-viewer/pull/347
FieldMetaInformation
by @AngelFP in https://github.com/openPMD/openPMD-viewer/pull/390
thetaMode
geometry by @AngelFP in https://github.com/openPMD/openPMD-viewer/pull/389
Full Changelog: https://github.com/openPMD/openPMD-viewer/compare/1.7.0...1.9.0
This release includes a few improvements:
This new release introduces several improvements:
The changes introduced in 1.3.0 caused a major slowdown when reading certain types of data. This has been fixed in this new release. (See #340 for more details.)
openPMD-viewer
now supports thetaMode
geometry with data written using r
as the fastest index (as written by e.g. WarpX in addition to the previously supported data format which used z
as the fastest index (as written by e.g. fbpic). (See 337)
openPMD-viewer
will raise an exception if the user asks for an iteration that is not part of the dataset (instead of printing a message and reverting to the first iteration, which can be confusing) (See 336)
This new release introduces preliminary support for mesh-refinement datasets (see #332).
This new release introduces several bug-fixes and miscellaneous features:
There is a new function get_energy_spread
that returns the energy spread of the beam. This is partially redundant with get_mean_gamma
, which is kept for backward compatibility. (see #304 and #317)
The 3D field reconstruction from ThetaMode
data now has an option max_resolution_3d
that limits the resolution of the final 3D array. This is added in order to limit the memory footprint of this array. (see #307) The 3D reconstruction is now also more accurate, thanks to the implementation of linear interpolation. (see #311)
A bug that affected reading ThetaMode
data with the openpmd-api
backend has been fixed. (see #313)
A bug that affected get_laser_waist
has been fixed. (see #320)
This new release introduces the option to read openPMD
files with different backends. In addition to the legacy h5py
backend (which can read only HDF5 openPMD file), openPMD-viewer
now has the option to use the openpmd-api
backend (which can read both HDF5 and ADIOS openPMD files). Because the openpmd-api
backend is thus more general, it is selected by default if available (i.e. if installed locally).
The user can override the default choice, by passing the backend
argument when creating an OpenPMDTimeSeries
object, and check which backend has been chosen by inspecting the .backend
attribute of this object.
In addition, several smaller changes were introduced in this PR:
get_laser_envelope
can now take the argument laser_propagation
in order to support lasers that do not propagates along the z
axis.openPMD-viewer
can now properly read groupBased
openPMD files (i.e. files that contain several iterations) #301.ParticleTracker
#283
This version introduces major changes and breaks backward compatibility.
Here is a list of the changes:
openpmd_viewer
instead of opmd_viewer
, e.g.from openpmd_viewer import OpenPMDTimeSeries
ts.get_particle
now return particle positions in meters,
instead of microns. For instance, in the code below, x
, y
, z
will be in
metersx, y, z = ts.get_particle(['x', 'y', 'z'], iteration=1000)
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 along y
while it now returns the full 3d field.
In addition, the name of the argument of get_field
that triggers slicing
has been changed from slicing_dir
to slice_across
(and slicing
has been
changed to slice_relative_position
).openPMD-viewer
does not rely on Cython anymore. Instead, it uses numba
for functions that perform a substantial amount of computation.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.get_laser_envelope
does not support the argument index
anymore
(which was effectively used in order to perform slicing). Instead, users should use
the argument slicing_dir
. In addition, get_laser_envelope
now supports the
argument plot_range
.get_laser_waist
does not support the agument slicing_dir
anymore.