picongpu.pypicongpu.species.operation.densityprofile

Subpackages

Submodules

Package Contents

Classes

DensityProfile

(abstract) parent class of all density profiles

Uniform

globally constant density

Foil

Directional density profile with thickness and pre- and

class picongpu.pypicongpu.species.operation.densityprofile.DensityProfile

Bases: picongpu.pypicongpu.rendering.RenderedObject

Inheritance diagram of picongpu.pypicongpu.species.operation.densityprofile.DensityProfile

(abstract) parent class of all density profiles

A density profile describes the density in space.

abstract check() None

check self, overwritten by child class

Perform checks if own parameters are valid. On error raise, if everything is okay pass silently.

get_generic_profile_rendering_context() dict

retrieve a context valid for “any profile”

Problem: Every profile 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 profiles get_rendering_context() provides only their parameters, i.e. there is no meta information on types etc.

If a generic profile is requested one can use the schema for “DensityProfile” (this class), for which this method returns the correct content, which includes metainformation and the data on the schema itself.

E.g.:

{
    "type": {
        "uniform": true,
        "gaussian": false,
        ...
    },
    "data": DATA
}

where DATA is the serialization as returned by get_rendering_context().

There are two context serialization methods for density profiles:

  • get_rendering_context()

    • provided by RenderedObject parent class, serialization (“context building”) performed by _get_serialized()

    • _get_serialized() implemented in every profile

    • checks against schema of respective profile

    • returned context is a representation of exactly this profile

    • (left empty == not implemented in parent ProfileDensity)

  • get_generic_profile_rendering_context()

    • implemented in parent densityprofile

    • returned representation is generic for any profile (i.e. contains meta information which type is actually used)

    • passes information from get_rendering_context() through

    • returned representation is designed for easy use with templating engine mustache

get_rendering_context() dict

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 violiation :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 violiation

  • RuntimeError – on schema not found

class picongpu.pypicongpu.species.operation.densityprofile.Uniform

Bases: picongpu.pypicongpu.species.operation.densityprofile.densityprofile.DensityProfile

Inheritance diagram of picongpu.pypicongpu.species.operation.densityprofile.Uniform

globally constant density

PIConGPU equivalent is the homogenous profile, but due to spelling ambiguities the PICMI name uniform is followed here.

density_si

density at every point in space (kg * m^-3)

check() None

check self, overwritten by child class

Perform checks if own parameters are valid. On error raise, if everything is okay pass silently.

get_generic_profile_rendering_context() dict

retrieve a context valid for “any profile”

Problem: Every profile 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 profiles get_rendering_context() provides only their parameters, i.e. there is no meta information on types etc.

If a generic profile is requested one can use the schema for “DensityProfile” (this class), for which this method returns the correct content, which includes metainformation and the data on the schema itself.

E.g.:

{
    "type": {
        "uniform": true,
        "gaussian": false,
        ...
    },
    "data": DATA
}

where DATA is the serialization as returned by get_rendering_context().

There are two context serialization methods for density profiles:

  • get_rendering_context()

    • provided by RenderedObject parent class, serialization (“context building”) performed by _get_serialized()

    • _get_serialized() implemented in every profile

    • checks against schema of respective profile

    • returned context is a representation of exactly this profile

    • (left empty == not implemented in parent ProfileDensity)

  • get_generic_profile_rendering_context()

    • implemented in parent densityprofile

    • returned representation is generic for any profile (i.e. contains meta information which type is actually used)

    • passes information from get_rendering_context() through

    • returned representation is designed for easy use with templating engine mustache

get_rendering_context() dict

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 violiation :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 violiation

  • RuntimeError – on schema not found

class picongpu.pypicongpu.species.operation.densityprofile.Foil

Bases: picongpu.pypicongpu.species.operation.densityprofile.densityprofile.DensityProfile

Inheritance diagram of picongpu.pypicongpu.species.operation.densityprofile.Foil

Directional density profile with thickness and pre- and post-plasma lengths and cutoffs

density_si

density at every point in space (kg * m^-3)

y_value_front_foil_si

position of the front of the foil plateau (m)

thickness_foil_si

thickness of the foil plateau (m)

pre_foil_plasmaRamp

pre(lower y) foil-plateau ramp of density

post_foil_plasmaRamp

post(higher y) foil-plateau ramp of density

check() None

check self, overwritten by child class

Perform checks if own parameters are valid. On error raise, if everything is okay pass silently.

get_generic_profile_rendering_context() dict

retrieve a context valid for “any profile”

Problem: Every profile 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 profiles get_rendering_context() provides only their parameters, i.e. there is no meta information on types etc.

If a generic profile is requested one can use the schema for “DensityProfile” (this class), for which this method returns the correct content, which includes metainformation and the data on the schema itself.

E.g.:

{
    "type": {
        "uniform": true,
        "gaussian": false,
        ...
    },
    "data": DATA
}

where DATA is the serialization as returned by get_rendering_context().

There are two context serialization methods for density profiles:

  • get_rendering_context()

    • provided by RenderedObject parent class, serialization (“context building”) performed by _get_serialized()

    • _get_serialized() implemented in every profile

    • checks against schema of respective profile

    • returned context is a representation of exactly this profile

    • (left empty == not implemented in parent ProfileDensity)

  • get_generic_profile_rendering_context()

    • implemented in parent densityprofile

    • returned representation is generic for any profile (i.e. contains meta information which type is actually used)

    • passes information from get_rendering_context() through

    • returned representation is designed for easy use with templating engine mustache

get_rendering_context() dict

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 violiation :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 violiation

  • RuntimeError – on schema not found