RF Signal Model¶

- class RFSignal(num_streams: int, num_samples: int, sampling_rate: float, carrier_frequencies: ndarray | None = None, noise_powers: ndarray | None = None, delay: float = 0.0, buffer: Buffer | None = None)[source]¶
Bases:
DenseSignalAn extension of general dense signals for propagation through RF chains.
It allows for diverging carrier frequencies and noise powers for each represented stream.
- Parameters:
num_streams – Number of streams in the signal.
num_samples – Number of samples per stream.
sampling_rate – Sampling rate of the signal in Hz.
carrier_frequencies – Carrier frequencies for each stream in Hz. If specified, must be of size num_streams.
noise_powers – Noise power for each stream in Watts. If specified, must be of size num_streams.
delay – Delay of the signal in seconds.
buffer – Optional buffer to use for the signal data.
- classmethod Deserialize(process)[source]¶
Deserialize an object’s state.
Objects cannot be deserialized directly, instead a
Factorymust be instructed to carry out the deserialization process.- Parameters:
process (
DeserializationProcess) – The current stage of the deserialization process. This object is generated by theFactoryand provides an interface to deserialization methods supporting multiple backends.- Return type:
- Returns:
The deserialized object.
- static FromDense(signal)[source]¶
Create a new RF signal from a given dense signal.
- Parameters:
signal (
DenseSignal) – Dense signal to convert.- Return type:
- Returns:
The created RF signal.
- classmethod FromNDArray(array, sampling_rate, carrier_frequency=None, noise_power=None, delay=0.0)[source]¶
Create a new RF signal from a given numpy ndarray.
- Parameters:
array (
ndarray[tuple[int,int],dtype[complex128]]) – Array containing the signal samples. Must be of shape (num_streams, num_samples).sampling_rate (
float) – Sampling rate of the signal in Hz.carrier_frequency (
float|ndarray[tuple[int],dtype[float64]] |None) – Carrier frequencies for each stream in Hz. If specified, must be of size num_streams.noise_power (
float|ndarray[tuple[int],dtype[float64]] |None) – Noise power for each stream in Watts. If specified, must be of size num_streams.delay (
float) – Delay of the signal in seconds.
- Return type:
- Returns:
The created RF signal.
- copy(order=None)[source]¶
Copy the dense signal samples into a new signal model with identical parameters.
- Return type:
- resample(sampling_rate, aliasing_filter=True)[source]¶
Resample the modeled signal to a different sampling rate.
- Parameters:
- Return type:
Returns: The resampled signal model.
- Raises:
ValueError – If sampling_rate is smaller or equal to zero.
- serialize(process)[source]¶
Serialize this object’s state.
Objects cannot be serialized directly, instead a
Factorymust be instructed to carry out the serialization process.- Parameters:
process (
SerializationProcess) – The current stage of the serialization process. This object is generated by theFactoryand provides an interface to serialization methods supporting multiple backends.- Return type: