Skip to content

Commit

Permalink
Update openPMD metadata (LASY-org#118)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
RemiLehe and pre-commit-ci[bot] authored Mar 27, 2023
1 parent 0332fd4 commit bca6994
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lasy/utils/openpmd_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ def write_to_openpmd_file(dim, file_prefix, file_format, grid, wavelength, pol):
# Define the mesh
m = i.meshes["laserEnvelope"]
m.grid_spacing = [
(hi - lo) / npoints for hi, lo, npoints in zip(box.hi, box.lo, box.npoints)
(hi - lo) / (npoints - 1)
for hi, lo, npoints in zip(box.hi, box.lo, box.npoints)
][::-1]
m.grid_global_offset = box.lo
m.unit_dimension = {
Expand Down

0 comments on commit bca6994

Please sign in to comment.