picmi-standard / picmi

Standard input format for Particle-In-Cell codes
https://picmi.readthedocs.io
Other
35 stars 25 forks source link

Remove diagnostic defaults #49

Closed dpgrote closed 2 years ago

dpgrote commented 3 years ago

In the diagnostics, the period was defaulted to 1 and the data_list for the fields and particles were specified. This PR removes those defaults and make period and 'data_list` required input parameters. This matches the desired behavior in WarpX and matches the overall structure of PICMI where in general default values are not given (relying on the defaults of the implementing codes).

ax3l commented 2 years ago

@dpgrote should data_list default to =None so that defaults can be picked by implementations?

Seeing

Traceback (most recent call last):
  File "Examples/Physics_applications/laser_acceleration/PICMI_inputs_laser_acceleration.py", line 115, in <module>
    part_diag1 = picmi.ParticleDiagnostic(name = 'diag1',
TypeError: __init__() missing 1 required positional argument: 'data_list'

now in @prkkumar's https://github.com/ECP-WarpX/WarpX/pull/2641