Signal Extraction

Inheritance diagram of hermespy.core.evaluators.SignalExtractor, hermespy.core.evaluators.SignalExtraction, hermespy.core.evaluators.ExtractedSignals

The signal extraction evaluator collects full sample streams at transmitting and receiving DSP layers during simulation or hardware loop runtime.

 1simulation = Simulation(num_samples=100)
 2device_alpha = simulation.new_device()
 3device_beta = simulation.new_device()
 4
 5# Create a transmitting and receiving modem for each device, respectively
 6modem_alpha = TransmittingModem(waveform=RRCWaveform())
 7device_alpha.transmitters.add(modem_alpha)
 8modem_beta = ReceivingModem(waveform=RRCWaveform())
 9device_beta.receivers.add(modem_beta)
10
11# Configure the simulation to extract generated signals
12simulation.add_evaluator(SignalExtractor(modem_alpha))
13simulation.add_evaluator(SignalExtractor(modem_beta))
14result = simulation.run()
class SignalExtractor(target)[source]

Bases: Evaluator

Evaluator extracting base-band sample sequences from DSP layour input or output streams.

Warning

Depending on the setup, this evaluator will create an enormous amount of data, which may lead to memory issues. If possible, signals should not be extracted from simulation runtimes.

Parameters:

target (Transmitter | Receiver) – The DSP layer to extract signals from.

Raises:

TypeError – If the target is not a transmitter or receiver instance.

evaluate()[source]

Extracts the base-band sample sequences from the DSP layout input or output streams.

Return type:

SignalExtraction

initialize_result(grid)[source]

Initialize the respective result object for this evaluator.

Parameters:

grid (Sequence[GridDimensionInfo]) – The parameter grid over which the simulation iterates.

Return type:

ExtractedSignals

Returns: The initialized evaluation result.

property abbreviation: str[source]

Short string representation of this evaluator.

Used as a label for console output and plot axes annotations.

property title: str[source]

Long string representation of this evaluator.

Used as plot title.

class SignalExtraction(signal)[source]

Bases: Evaluation[PlotVisualization], Artifact

Parameters:

signal (Signal) – The base-band signal to extract.

artifact()[source]

Returns the signal extraction as an artifact.

For signal extraction, the artifact is the same as the evaluation.

Return type:

SignalExtraction

to_scalar()[source]

Scalar representation of the signal extraction.

Not available, therefore always returns None.

Return type:

None

property signal: Signal[source]

The extracted base-band signal.

class ExtractedSignals(grid, evaluator=None, base_dimension_index=0)[source]

Bases: EvaluationResult[SignalExtraction]

Result of a signal extraction evaluation.

Stores the extracted signal samples in a grid structure.

Parameters:
  • grid (Sequence[GridDimensionInfo]) – The grid of the evaluation result.

  • evaluator (Evaluator | None) – The evaluator that produced this result.

  • base_dimension_index (int) – The index of the base dimension used for plotting.

add_artifact(coordinates, artifact, compute_confidence=True)[source]

Add an artifact to this evaluation result.

Parameters:
  • coordinates (tuple[int, ...]) – Coordinates of the grid section to which the artifact belongs.

  • artifact (SignalExtraction) – Artifact to be added.

  • compute_confidence (bool) – Whether to compute the confidence level of the evaluation result for the given section coordinates.

Return type:

bool

Returns:

Can the result be trusted? Always False if compute_confidence is set to False.

runtime_estimates()[source]

Extract a runtime estimate for this evaluation result.

Returns: A numpy array containing the runtime estimates for each grid section. If no estimates are available, None is returned.

Return type:

None

to_array()[source]

Convert the evaluation result raw data to an array representation.

Used to store the results in arbitrary binary file formats after simulation execution.

Returns: The array result representation.

Return type:

ndarray