Pipeline¶
Pipelines are HermesPy’s way of representing a sequence of signal processing operations.
- class Pipeline(scenario, num_drops=1, *args, **kwargs)[source]¶
Bases:
Executable
,Generic
[ScenarioType
,DeviceType
]Base class of HermesPy simulation pipelines.
- Parameters:
scenario (ScenarioType) – The simulated scenario.
num_drops (int, optional) – Number of consecutive triggers occuring during
run()
, resulting in num_drops data drops being generated. One by default.
- add_device(device)[source]¶
Add an exsting device to the scenario.
Convenience function pointing to
hermespy.core.scenario.Scenario.add_device()
.- Parameters:
device (
TypeVar
(DeviceType
, bound= Device)) – New device to be added to the scenario.- Raises:
ValueError – If the device already exists.
RuntimeError – If the scenario is not in default mode.
RuntimeError – If the scenario does not allow for the creation or addition of new devices.
- Return type:
- device_index(device)[source]¶
Get the index of a device in the scenario.
Convenience function pointing to
hermespy.core.scenario.Scenario.device_index()
.- Parameters:
device (
TypeVar
(DeviceType
, bound= Device)) – Device to be searched for.- Return type:
Returns: The index of the device.
- Raises:
ValueError – If the device does not exist.
- new_device(*args, **kwargs)[source]¶
Add a new device to the scenario.
Convenience function pointing to
hermespy.core.scenario.Scenario.new_device()
.Returns: Handle to the created device.
- Raises:
ValueError – If the device already exists.
RuntimeError – If the scenario is not in default mode.
RuntimeError – If the scenario does not allow for the creation or addition of new devices.
- Return type:
TypeVar
(DeviceType
, bound= Device)
- property num_drops: int¶
Number of generated data drops.
Each drop is generated from a dedicated system triggering.
Returns: The number of drops.
- Raises:
ValueError – For num_drops smaller than one.
- property scenario: ScenarioType¶
The simulated scenario.
Returns: Handle to the scenario.