picongpu.pypicongpu.output
Submodules
- picongpu.pypicongpu.output.auto
- picongpu.pypicongpu.output.checkpoint
- picongpu.pypicongpu.output.energy_histogram
- picongpu.pypicongpu.output.macro_particle_count
- picongpu.pypicongpu.output.phase_space
- picongpu.pypicongpu.output.plugin
- picongpu.pypicongpu.output.png
- picongpu.pypicongpu.output.timestepspec
Classes
Class to provide output without further configuration. |
|
general interface for all plugins |
|
general interface for all plugins |
|
general interface for all plugins |
|
general interface for all plugins |
|
Class to be inherited from for rendering context generation |
|
general interface for all plugins |
Package Contents
- class picongpu.pypicongpu.output.Auto
Bases:
picongpu.pypicongpu.output.plugin.Plugin
Class to provide output without further configuration.
This class requires a period (in time steps) and will enable as many output plugins as feasable for all species. Note: The list of species from the initmanager is used during rendering.
No further configuration is possible! If you want to provide additional configuration for plugins, create a separate class.
- period
period to print data at
- check() None
validate attributes
- classmethod __init_subclass__()
- get_rendering_context()
retrieve a generic context containing type information specifying a subclass
Problem: Every self-registered subclass has its respective schema, and it is difficult in JSON (particularly in a mustache-compatible way) to get the type of the schema.
Solution: The normal rendering of self-registered subclasses via get_rendering_context() provides only their parameters, i.e. there is no meta information on types etc.
If a generic context is requested one can use the schema for parent class, for which this method returns the correct content. It includes metainformation and the data on the schema itself.
E.g.:
{ "type": { "phasespace": true, "auto": false, ... }, "data": DATA }
where DATA is the serialization as returned by get_rendering_context().
- __hash__()
custom hash function for indexing in dicts
- static check_context_for_type(type_to_check: type, context: dict | None)
check if the given context is valid for the given type
Raises on error, passes silently if okay.
- Raises:
ValidationError – on schema violation
RuntimeError – on schema not found
- class picongpu.pypicongpu.output.PhaseSpace
Bases:
picongpu.pypicongpu.output.plugin.Plugin
general interface for all plugins
- species
- period
- spatial_coordinate
- momentum_coordinate
- min_momentum
- max_momentum
- check()
- classmethod __init_subclass__()
- get_rendering_context()
retrieve a generic context containing type information specifying a subclass
Problem: Every self-registered subclass has its respective schema, and it is difficult in JSON (particularly in a mustache-compatible way) to get the type of the schema.
Solution: The normal rendering of self-registered subclasses via get_rendering_context() provides only their parameters, i.e. there is no meta information on types etc.
If a generic context is requested one can use the schema for parent class, for which this method returns the correct content. It includes metainformation and the data on the schema itself.
E.g.:
{ "type": { "phasespace": true, "auto": false, ... }, "data": DATA }
where DATA is the serialization as returned by get_rendering_context().
- __hash__()
custom hash function for indexing in dicts
- static check_context_for_type(type_to_check: type, context: dict | None)
check if the given context is valid for the given type
Raises on error, passes silently if okay.
- Raises:
ValidationError – on schema violation
RuntimeError – on schema not found
- class picongpu.pypicongpu.output.EnergyHistogram
Bases:
picongpu.pypicongpu.output.plugin.Plugin
general interface for all plugins
- species
- period
- bin_count
- min_energy
- max_energy
- classmethod __init_subclass__()
- get_rendering_context()
retrieve a generic context containing type information specifying a subclass
Problem: Every self-registered subclass has its respective schema, and it is difficult in JSON (particularly in a mustache-compatible way) to get the type of the schema.
Solution: The normal rendering of self-registered subclasses via get_rendering_context() provides only their parameters, i.e. there is no meta information on types etc.
If a generic context is requested one can use the schema for parent class, for which this method returns the correct content. It includes metainformation and the data on the schema itself.
E.g.:
{ "type": { "phasespace": true, "auto": false, ... }, "data": DATA }
where DATA is the serialization as returned by get_rendering_context().
- __hash__()
custom hash function for indexing in dicts
- static check_context_for_type(type_to_check: type, context: dict | None)
check if the given context is valid for the given type
Raises on error, passes silently if okay.
- Raises:
ValidationError – on schema violation
RuntimeError – on schema not found
- class picongpu.pypicongpu.output.MacroParticleCount
Bases:
picongpu.pypicongpu.output.plugin.Plugin
general interface for all plugins
- species
- period
- classmethod __init_subclass__()
- get_rendering_context()
retrieve a generic context containing type information specifying a subclass
Problem: Every self-registered subclass has its respective schema, and it is difficult in JSON (particularly in a mustache-compatible way) to get the type of the schema.
Solution: The normal rendering of self-registered subclasses via get_rendering_context() provides only their parameters, i.e. there is no meta information on types etc.
If a generic context is requested one can use the schema for parent class, for which this method returns the correct content. It includes metainformation and the data on the schema itself.
E.g.:
{ "type": { "phasespace": true, "auto": false, ... }, "data": DATA }
where DATA is the serialization as returned by get_rendering_context().
- __hash__()
custom hash function for indexing in dicts
- static check_context_for_type(type_to_check: type, context: dict | None)
check if the given context is valid for the given type
Raises on error, passes silently if okay.
- Raises:
ValidationError – on schema violation
RuntimeError – on schema not found
- class picongpu.pypicongpu.output.Png
Bases:
picongpu.pypicongpu.output.plugin.Plugin
general interface for all plugins
- species
- period
- axis
- slicePoint
- folder
- scale_image
- scale_to_cellsize
- white_box_per_GPU
- EM_FIELD_SCALE_CHANNEL1
- EM_FIELD_SCALE_CHANNEL2
- EM_FIELD_SCALE_CHANNEL3
- preParticleDensCol
- preChannel1Col
- preChannel2Col
- preChannel3Col
- customNormalizationSI
- preParticleDens_opacity
- preChannel1_opacity
- preChannel2_opacity
- preChannel3_opacity
- preChannel1
- preChannel2
- preChannel3
- classmethod __init_subclass__()
- get_rendering_context()
retrieve a generic context containing type information specifying a subclass
Problem: Every self-registered subclass has its respective schema, and it is difficult in JSON (particularly in a mustache-compatible way) to get the type of the schema.
Solution: The normal rendering of self-registered subclasses via get_rendering_context() provides only their parameters, i.e. there is no meta information on types etc.
If a generic context is requested one can use the schema for parent class, for which this method returns the correct content. It includes metainformation and the data on the schema itself.
E.g.:
{ "type": { "phasespace": true, "auto": false, ... }, "data": DATA }
where DATA is the serialization as returned by get_rendering_context().
- __hash__()
custom hash function for indexing in dicts
- static check_context_for_type(type_to_check: type, context: dict | None)
check if the given context is valid for the given type
Raises on error, passes silently if okay.
- Raises:
ValidationError – on schema violation
RuntimeError – on schema not found
- class picongpu.pypicongpu.output.TimeStepSpec(specs: list[slice])
Bases:
picongpu.pypicongpu.rendering.renderedobject.RenderedObject
Class to be inherited from for rendering context generation
Every object that intends to generate a rendering context (typically as a dict) must inherit from this class and implement _get_serialized().
It is expected that _get_serialized() fully encodes the internal state, i.e. two equal (==) objects also return an equal result for _get_serialized().
For external usage, the method get_rendering_context() is provided. It passes _get_serialized() through, checking its result against a predefined json schema. If this schema is not fullfilled/not available, an error is raised.
- specs
- __hash__()
custom hash function for indexing in dicts
- get_rendering_context() dict | None
get rendering context representation of this object
delegates work to _get_serialized and invokes checks performed by check_context_for_type(). :raise ValidationError: on schema violation :raise RuntimeError: on schema not found :return: self as rendering context
- static check_context_for_type(type_to_check: type, context: dict | None)
check if the given context is valid for the given type
Raises on error, passes silently if okay.
- Raises:
ValidationError – on schema violation
RuntimeError – on schema not found
- class picongpu.pypicongpu.output.Checkpoint
Bases:
picongpu.pypicongpu.output.plugin.Plugin
general interface for all plugins
- period
- timePeriod
- directory
- file
- restart
- tryRestart
- restartStep
- restartDirectory
- restartFile
- restartChunkSize
- restartLoop
- openPMD
- check()
- classmethod __init_subclass__()
- get_rendering_context()
retrieve a generic context containing type information specifying a subclass
Problem: Every self-registered subclass has its respective schema, and it is difficult in JSON (particularly in a mustache-compatible way) to get the type of the schema.
Solution: The normal rendering of self-registered subclasses via get_rendering_context() provides only their parameters, i.e. there is no meta information on types etc.
If a generic context is requested one can use the schema for parent class, for which this method returns the correct content. It includes metainformation and the data on the schema itself.
E.g.:
{ "type": { "phasespace": true, "auto": false, ... }, "data": DATA }
where DATA is the serialization as returned by get_rendering_context().
- __hash__()
custom hash function for indexing in dicts
- static check_context_for_type(type_to_check: type, context: dict | None)
check if the given context is valid for the given type
Raises on error, passes silently if okay.
- Raises:
ValidationError – on schema violation
RuntimeError – on schema not found