pogona.ModulationPPM

class pogona.ModulationPPM[source]

Bases: ModulationOOK

Separates the symbol duration into N chips for N-PPM.

Attributes

attached_destructor

Component name of the attached destructor.

attached_injector

Component name of the attached injector.

attached_pump

Component name of the attached pump.

chip_duration

chips_per_symbol

Must be a power of 2 and greater than 1.

component_name

Unique name of this component, unless it is "Generic component".

injection_duration

Duration of one injection in seconds.

injection_volume

Injection volume for each bit in litres.

pause_duration

Time in seconds to wait after an injection (with injection_duration) before injecting the next pulse or, if ascii_sequence or bit_sequence is given, the time to wait before injecting the next bit.

symbol_duration

use_burst

By default, the attached injector is turned on in every time step.

__init__()[source]

Methods

__init__()

bitstream_to_ppm(bitstream, chips_per_symbol)

Convert bitstream into PPM bitstream, e.g., 101101 for 2-PPM: 01|10|01|01|10|01 or 101101 for 4-PPM: 0010|0001|0100 or 101101 for 8-PPM: 000001000|00000100

finalize(simulation_kernel)

initialize(simulation_kernel, init_stage)

Use InitStages to initialize this Component instance.

process_new_time_step(simulation_kernel, ...)

set_arguments(**kwargs)

Read arguments as key value pairs and set this component's member variables accordingly.

transmit_bitstream(bitstream, ...)

__init__()[source]
static bitstream_to_ppm(bitstream: str, chips_per_symbol: int) str[source]

Convert bitstream into PPM bitstream, e.g., 101101 for 2-PPM: 01|10|01|01|10|01 or 101101 for 4-PPM: 0010|0001|0100 or 101101 for 8-PPM: 000001000|00000100

finalize(simulation_kernel: SimulationKernel)
initialize(simulation_kernel: SimulationKernel, init_stage: InitStages)[source]

Use InitStages to initialize this Component instance.

process_new_time_step(simulation_kernel: SimulationKernel, notification_stage: NotificationStages)[source]
set_arguments(**kwargs)

Read arguments as key value pairs and set this component’s member variables accordingly. Validity of the argument values will be checked in initialize().

transmit_bitstream(bitstream: str, simulation_kernel: SimulationKernel, finish_callback: Optional[Callable])[source]
attached_destructor = ''

Component name of the attached destructor.

attached_injector = ''

Component name of the attached injector.

attached_pump = ''

Component name of the attached pump. A pump is required for coordinating the timing of an injection. Consider using an ObjectPumpTimed if you are not dealing with injection volumes or fluid vector fields in general.

property chip_duration: float
chips_per_symbol = 2

Must be a power of 2 and greater than 1.

component_name = 'Generic component'

Unique name of this component, unless it is “Generic component”.

id

Unique integer component ID

injection_duration = 0.0

Duration of one injection in seconds. If a bit stream is given, the injection_duration specifies the duration of the injection for each individual bit.

injection_volume = 0.0

Injection volume for each bit in litres. If this is given, injection_duration should be 0 as it will be determined by the pump model. In this case, pause_duration will be equal to the cycle duration and independent of how long an injection takes. Take care to not let injections overlap.

pause_duration = 0.0

Time in seconds to wait after an injection (with injection_duration) before injecting the next pulse or, if ascii_sequence or bit_sequence is given, the time to wait before injecting the next bit.

property symbol_duration: float
use_burst = False

By default, the attached injector is turned on in every time step. If use_burst is True, however, it will only be turned on at the beginning of an injection.