Added capability to StageWakeT to save simulation outputs along the stage and some bugfixes#158
Added capability to StageWakeT to save simulation outputs along the stage and some bugfixes#158ben-c-2013 wants to merge 16 commits intomainfrom
StageWakeT to save simulation outputs along the stage and some bugfixes#158Conversation
…_wake_t to make it always dump one time step.
…iles along the stage. Also corrected docstrings.
…ction signature of StageWakeT.plot_waterfalls() and edited docstrings.
… StageWakeT to remove unnecessary parameters.
| keep_data : bool | ||
| Flag for whether to keep raw Wake-T output after simulation. | ||
| output_period : int, optional | ||
| Number of times along the stage in which the Wake-T diagnostics data |
There was a problem hiding this comment.
Should be "output every output_period time steps", also point to wake_t.Plasma_stage n_out parameter?
There was a problem hiding this comment.
Should this be a standard parameter for ALL Stage classes?
There was a problem hiding this comment.
How does this interact with initial and final step outputs?
There was a problem hiding this comment.
Unit of "dz" does not work well, since it is unknown to the user. A better idea would be to set the period in meters, or to set the number of outputs (as in n_out for wake_t)
| @@ -118,25 +138,27 @@ def track(self, beam0, savedepth=0, runnable=None, verbose=False): | |||
| wakefield_model='quasistatic_2d_ion' | |||
| else: | |||
| wakefield_model='quasistatic_2d' | |||
|
|
|||
| if self.output_period is None: | |||
| self.output_period = round(self.length/dz/8) | |||
There was a problem hiding this comment.
Add comment: "Defaults to 8 times throughout the stage"
| plasma = wake_t.PlasmaStage(length=self.length, density=plasma_profile, wakefield_model=wakefield_model, | ||
| r_max=box_size_r, r_max_plasma=box_size_r, xi_min=box_min_z, xi_max=box_max_z, | ||
| n_out=n_out, n_r=int(self.num_cell_xy), n_xi=int(num_cell_z), dz_fields=dz, ppc=1) | ||
| n_out=self.output_period, n_r=int(self.num_cell_xy), n_xi=int(num_cell_z), dz_fields=dz, ppc=1) |
There was a problem hiding this comment.
n_out has a different meaning...
kyrsjo
left a comment
There was a problem hiding this comment.
Confusion about meaning. Propose to move this parameter to Stage class, and define clearly, i.e. as the number of outputs (with clarification if this should include final/initial steps), or period in meters for "in between" outputs.
Bugfixes involve class methods generating waterfall plots not importing the correct functions and waterfall plots not being saved.