Diagnostics

Warning

This section is currently in development.

Standard PIC diagnostics

class picmistandard.PICMI_ParticleDiagnostic(**extra_data: Any)[source]

Base class for all PICMI classes using Pydantic for validation and extensibility.

This class allows code-specific extensions (e.g., warpx_* kwargs) via Pydantic’s extra fields mechanism while maintaining type safety for standard attributes.

Implementation specific documentation

Defines the particle diagnostics in the simulation frame.

field period: int [Required]

Period of time steps that the diagnostic is performed

field species: PICMI_Species | PICMI_MultiSpecies | list[PICMI_Species | PICMI_MultiSpecies] | None = None

Species instance or list of species instances. Species to write out. If not specified, all species are written. Note that the name attribute must be defined for the species.

field data_list: list[str] | None = None

The data to be written out. Possible values ‘position’, ‘momentum’, ‘weighting’. Defaults to the output list of the implementing code.

field write_dir: str | None = None

Directory where data is to be written

field step_min: int | None = None

Minimum step at which diagnostics could be written

field step_max: int | None = None

Maximum step at which diagnostics could be written

field parallelio: bool | None = None

If set to True, particle diagnostics are dumped in parallel

field name: str | None = None

Sets the base name for the diagnostic output files

class picmistandard.PICMI_FieldDiagnostic(*, grid: PICMI_Cartesian1DGrid | PICMI_Cartesian2DGrid | PICMI_Cartesian3DGrid | PICMI_CylindricalGrid, period: int, data_list: list[str] | None = None, write_dir: str | None = None, step_min: int | None = None, step_max: int | None = None, number_of_cells: Sequence[int] | None = None, lower_bound: Sequence[float] | None = None, upper_bound: Sequence[float] | None = None, parallelio: bool | None = None, name: str | None = None, **extra_data: Any)[source]

Base class for all PICMI classes using Pydantic for validation and extensibility.

This class allows code-specific extensions (e.g., warpx_* kwargs) via Pydantic’s extra fields mechanism while maintaining type safety for standard attributes.

Implementation specific documentation

Defines the electromagnetic field diagnostics in the simulation frame.

field grid: PICMI_Cartesian1DGrid | PICMI_Cartesian2DGrid | PICMI_Cartesian3DGrid | PICMI_CylindricalGrid [Required]

Grid object for the diagnostic

field period: int [Required]

Period of time steps that the diagnostic is performed

field data_list: list[str] | None = None

List of quantities to write out. Possible values ‘rho’, ‘E’, ‘B’, ‘J’, ‘Ex’ etc. Defaults to the output list of the implementing code.

field write_dir: str | None = None

Directory where data is to be written

field step_min: int | None = None

Minimum step at which diagnostics could be written

field step_max: int | None = None

Maximum step at which diagnostics could be written

field number_of_cells: Sequence[int] | None = None

Number of cells in each dimension. If not given, will be obtained from grid.

field lower_bound: Sequence[float] | None = None

Lower corner of diagnostics box in each direction. If not given, will be obtained from grid.

field upper_bound: Sequence[float] | None = None

Higher corner of diagnostics box in each direction. If not given, will be obtained from grid.

field parallelio: bool | None = None

If set to True, field diagnostics are dumped in parallel

field name: str | None = None

Sets the base name for the diagnostic output files

class picmistandard.PICMI_ElectrostaticFieldDiagnostic(*, grid: PICMI_Cartesian1DGrid | PICMI_Cartesian2DGrid | PICMI_Cartesian3DGrid | PICMI_CylindricalGrid, period: int, data_list: list[str] | None = None, write_dir: str | None = None, step_min: int | None = None, step_max: int | None = None, number_of_cells: Sequence[int] | None = None, lower_bound: Sequence[float] | None = None, upper_bound: Sequence[float] | None = None, parallelio: bool | None = None, name: str | None = None, **extra_data: Any)[source]

Base class for all PICMI classes using Pydantic for validation and extensibility.

This class allows code-specific extensions (e.g., warpx_* kwargs) via Pydantic’s extra fields mechanism while maintaining type safety for standard attributes.

Implementation specific documentation

Defines the electrostatic field diagnostics in the simulation frame.

field grid: PICMI_Cartesian1DGrid | PICMI_Cartesian2DGrid | PICMI_Cartesian3DGrid | PICMI_CylindricalGrid [Required]

Grid object for the diagnostic

field period: int [Required]

Period of time steps that the diagnostic is performed

field data_list: list[str] | None = None

List of quantities to write out. Possible values ‘rho’, ‘E’, ‘B’, ‘Ex’ etc. Defaults to the output list of the implementing code.

field write_dir: str | None = None

Directory where data is to be written

field step_min: int | None = None

Minimum step at which diagnostics could be written

field step_max: int | None = None

Maximum step at which diagnostics could be written

field number_of_cells: Sequence[int] | None = None

Number of cells in each dimension. If not given, will be obtained from grid.

field lower_bound: Sequence[float] | None = None

Lower corner of diagnostics box in each direction. If not given, will be obtained from grid.

field upper_bound: Sequence[float] | None = None

Higher corner of diagnostics box in each direction. If not given, will be obtained from grid.

field parallelio: bool | None = None

If set to True, field diagnostics are dumped in parallel

field name: str | None = None

Sets the base name for the diagnostic output files

class picmistandard.PICMI_ParticleBoundaryScrapingDiagnostic(**extra_data: Any)[source]

Base class for all PICMI classes using Pydantic for validation and extensibility.

This class allows code-specific extensions (e.g., warpx_* kwargs) via Pydantic’s extra fields mechanism while maintaining type safety for standard attributes.

Implementation specific documentation

Defines the particle diagnostics that are used to collect the particles that are absorbed at the boundaries, throughout the simulation.

field period: int [Required]

Period of time steps that the diagnostic is performed

field species: PICMI_Species | PICMI_MultiSpecies | list[PICMI_Species | PICMI_MultiSpecies] | None = None

Species instance or list of species instances. Species to write out. If not specified, all species are written. Note that the name attribute must be defined for the species.

field data_list: list[str] | None = None

The data to be written out. Possible values ‘position’, ‘momentum’, ‘weighting’. Defaults to the output list of the implementing code.

field write_dir: str | None = None

Directory where data is to be written

field parallelio: bool | None = None

If set to True, particle diagnostics are dumped in parallel

field name: str | None = None

Sets the base name for the diagnostic output files

Lab-frame diagnostics

These diagnostics are used when running boosted-frame simulations.

class picmistandard.PICMI_LabFrameParticleDiagnostic(**extra_data: Any)[source]

Base class for all PICMI classes using Pydantic for validation and extensibility.

This class allows code-specific extensions (e.g., warpx_* kwargs) via Pydantic’s extra fields mechanism while maintaining type safety for standard attributes.

Implementation specific documentation

Defines the particle diagnostics in the lab frame.

field grid: PICMI_Cartesian1DGrid | PICMI_Cartesian2DGrid | PICMI_Cartesian3DGrid | PICMI_CylindricalGrid [Required]

Grid object for the diagnostic

field num_snapshots: int [Required]

Number of lab frame snapshots to make

field dt_snapshots: float [Required]

Time between each snapshot in lab frame

field species: PICMI_Species | PICMI_MultiSpecies | list[PICMI_Species | PICMI_MultiSpecies] | None = None

Species instance or list of species instances. Species to write out. If not specified, all species are written. Note that the name attribute must be defined for the species.

field data_list: list[str] | None = None

The data to be written out. Possible values ‘position’, ‘momentum’, ‘weighting’. Defaults to the output list of the implementing code.

field time_start: float = 0.0

Time for the first snapshot in lab frame

field write_dir: str | None = None

Directory where data is to be written

field parallelio: bool | None = None

If set to True, particle diagnostics are dumped in parallel

field name: str | None = None

Sets the base name for the diagnostic output files

class picmistandard.PICMI_LabFrameFieldDiagnostic(*, grid: PICMI_Cartesian1DGrid | PICMI_Cartesian2DGrid | PICMI_Cartesian3DGrid | PICMI_CylindricalGrid, num_snapshots: int, dt_snapshots: float, data_list: list[str] | None = None, z_subsampling: int = 1, time_start: float = 0.0, write_dir: str | None = None, parallelio: bool | None = None, name: str | None = None, **extra_data: Any)[source]

Base class for all PICMI classes using Pydantic for validation and extensibility.

This class allows code-specific extensions (e.g., warpx_* kwargs) via Pydantic’s extra fields mechanism while maintaining type safety for standard attributes.

Implementation specific documentation

Defines the electromagnetic field diagnostics in the lab frame.

field grid: PICMI_Cartesian1DGrid | PICMI_Cartesian2DGrid | PICMI_Cartesian3DGrid | PICMI_CylindricalGrid [Required]

Grid object for the diagnostic

field num_snapshots: int [Required]

Number of lab frame snapshots to make

field dt_snapshots: float [Required]

Time between each snapshot in lab frame

field data_list: list[str] | None = None

List of quantities to write out. Possible values ‘rho’, ‘E’, ‘B’, ‘J’, ‘Ex’ etc. Defaults to the output list of the implementing code.

field z_subsampling: int = 1

A factor which is applied on the resolution of the lab frame reconstruction

field time_start: float = 0.0

Time for the first snapshot in lab frame

field write_dir: str | None = None

Directory where data is to be written

field parallelio: bool | None = None

If set to True, field diagnostics are dumped in parallel

field name: str | None = None

Sets the base name for the diagnostic output files