Physical Device¶
- class PhysicalDevice(max_receive_delay=0.0, noise_power=None, leakage_calibration=None, delay_calibration=None, *args, **kwargs)[source]¶
-
Base representing any device controlling real hardware.
- Parameters:
max_receive_delay (float, optional) – Maximum expected delay during siganl reception in seconds. Zero by default.
noise_power (np.ndarray, optional) – Assumed power of the hardware noise at the device’s receive chains.
leakage_calibration (LeakageCalibrationBase, optional) – The leakage calibration routine to apply to received signals. If not provided, defaults to the
NoLeakageCalibration
stub routine.delay_calibration (DelayCalibrationBase, optional) – The delay calibration routine to apply to received signals. If not provided, defaults to the
NoDelayCalibration
stub routine.*args –
Device
base class initialization parameters.**kwargs –
Device
base class initialization parameters.
- estimate_noise_power(num_samples=1000, cache=True)[source]¶
Estimate the power of the noise floor within the hardware.
Receives num_samples without any transmissions and estimates the power over them. Note that any interference in this case will be interpreted as noise.
- Parameters:
num_samples (int, optional) – Number of received samples. 1000 by default.
cache (bool, optional) – If enabled, the
PhysicalDevice.noise_power()
property will be updated.
- Returns:
Estimated noise power at each respective receive channel, i.e. the variance of the unbiased received samples.
- Return type:
np.ndarray
- process_input(impinging_signals=None, cache=True)[source]¶
Process input signals impinging onto this device.
- Parameters:
impinging_signals (Union[DeviceInput, Signal, Sequence[Signal]]) – The samples to be processed by the device.
cache (bool, optional) – Cache the operator inputs at the registered receive operators for further processing. Enabled by default.
- Return type:
Returns: The processed device input information.
- Raises:
ValueError – If the number of signal streams does not match the device configuration expectations.
- receive(impinging_signals=None, cache=True)[source]¶
Receive over this device.
Internally calls
Device.process_input()
andDevice.receive_operators()
.- Parameters:
impinging_signals (Union[DeviceInput, Signal, Sequence[Signal]]) – The samples to be processed by the device.
cache (bool, optional) – Cache the received information. Enabled by default.
- Return type:
Returns: The received device information.
- transmit(clear_cache=True)[source]¶
Transmit over this device.
- Parameters:
clear_cache (bool, optional) – Clear the cache of operator signals to be transmitted. Enabled by default.
- Return type:
Returns: Information transmitted by this device.
- trigger_direct(signal, calibrate=True)[source]¶
Trigger a direct transmission and reception.
Bypasses the operator abstraction layer and directly transmits the given signal.
- Parameters:
- Return type:
Returns: The received signal.
- Raises:
ValueError – If the signal’s carrier frequency or sampling rate does not match the device’s.
- property adaptive_sampling: bool¶
Allow adaptive sampling during transmission.
Returns: Enabled flag.
- property delay_calibration: DelayCalibrationBase¶
Delay calibration routine to apply to received signals.
- Returns:
Handle to the delay calibration routine.
- property leakage_calibration: LeakageCalibrationBase¶
Leakage calibration routine to apply to received signals.
- Returns:
Handle to the calibration routine.
- property lowpass_bandwidth: float¶
Digital lowpass filter bandwidth
- Returns:
Filter bandwidth in Hz. Zero if the device should determine the bandwidth automatically.
- Raises:
ValueError – For negative bandwidths.
- property lowpass_filter: bool¶
Apply a digital lowpass filter to the received base-band samples.
Returns: Enabled flag.
- property max_receive_delay: float¶
Maximum expected delay during signal reception.
The expected delay will be appended as additional samples to the expected frame length during reception.
- Returns:
The expected receive delay in seconds.
- Raises:
ValueError – If the delay is smaller than zero.
- abstract property max_sampling_rate: float¶
Maximal device sampling rate.
Returns: The samplin rate in Hz.
- property noise_power: ndarray | None¶
Assumed hardware noise power at the device’s receive chains.
- Returns:
Numpy array indicating the noise power at each receive chain. None if unknown or not specified.
- Raises:
ValueError – If any power is negative.