Skip to content

Commit

Permalink
updated export_to_lasy with new lasy api for field access
Browse files Browse the repository at this point in the history
added iterations tracker in various_diags
  • Loading branch information
hightower8083 committed Feb 3, 2025
1 parent 12ef51a commit 486c6b3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions axiprop/simulation/diags.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ def diags_to_file(self, file_name='various_diags.h5'):
for diag_str in self.diags.keys():
fl[diag_str] = self.diags[diag_str]
fl['errors'] = self.errors
fl['iterations'] = self.iterations
fl['z_axis_err'] = self.z_axis_err


Expand Down
2 changes: 1 addition & 1 deletion axiprop/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,6 @@ def export_to_lasy(Container, polarization=(1,0), dimensions='rt'):
Container.frequency_to_time()

laser = Laser(dimensions, lo, hi, num_points, empty_profile)
laser.grid.field[:] = np.moveaxis(Container.Field, 0, -1)
laser.grid.set_temporal_field(np.moveaxis(Container.Field, 0, -1)[None,...])

return laser

0 comments on commit 486c6b3

Please sign in to comment.