State

Inheritance diagram of hermespy.core.state.State, hermespy.core.state.DeviceState, hermespy.core.state.TransmitState, hermespy.core.state.ReceiveState

State objects represent the immutable properties of a device at a specific point in time. They are being passed in between the different stages of processing and simulation pipelines instead of references to the actual device objects.

class State(timestamp, pose, velocity, carrier_frequency, bandwidth, oversampling_factor, antennas)[source]

Bases: object

Base of all state data containers.

They describe the information available to different stages of the signal processing pipelines and are used to pass information to the corresponding signal processing algorithms.

Parameters:
  • timestamp (float) – Global timestamp of the device state.

  • pose (Transformation) – Pose of the device with respect to the global coordinate system.

  • velocity (ndarray) – Velocity of the device in m/s.

  • carrier_frequency (float) – Carrier frequency of the device in Hz.

  • bandwidth (float) – Bandwidth of the simulated base-band signal in Hz. The actual sampling rate is calculated as bandwidth * oversampling_factor.

  • oversampling_factor (int) – Oversampling factor of the simulated base-band signal. The actual sampling rate is calculated as bandwidth * oversampling_factor.

  • antennas (AntennaArrayState) – State of the device’s antenna array.

property antennas: AntennaArrayState[source]

State of the device’s antenna array.

property bandwidth: float[source]

Bandwidth of the simulated base-band signal in Hz.

property carrier_frequency: float[source]

Carrier frequency of the device in Hz.

property oversampling_factor: int[source]

Oversampling factor of the simulated base-band signal.

property pose: Transformation[source]

Global pose of the device.

property position: ndarray[source]

Global position of the device in cartesian coordinates.

Shorthand to translation of pose.

property sampling_rate: float[source]

Sampling rate of the device in Hz.

property timestamp: float[source]

Global timestamp of the device state.

property velocity: ndarray[source]

Velocity of the device in m/s.

class DeviceState(device_id, timestamp, pose, velocity, carrier_frequency, bandwidth, oversampling_factor, antennas, num_transmit_dsp_ports, num_receive_dsp_ports, num_transmit_rf_ports, num_receive_rf_ports)[source]

Bases: State

Data container representing the immutable physical state of a device.

Generated by calling the Device.state method. In order to avoid confusion with the mutable state of the device, this class is immutable and only references the represented device by its memory address and time stamp.

Parameters:
  • device_id (int) – Unique identifier of the device this state represents.

  • timestamp (float) – Time stamp of the device state.

  • pose (Transformation) – Pose of the device with respect to the global coordinate system.

  • velocity (ndarray) – Velocity of the device in m/s.

  • carrier_frequency (float) – Carrier frequency of the device in Hz.

  • bandwidth (float) – Bandwidth of the simulated base-band signal in Hz. The actual sampling rate is calculated as bandwidth * oversampling_factor.

  • oversampling_factor (int) – Oversampling factor of the simulated base-band signal. The actual sampling rate is calculated as bandwidth * oversampling_factor.

  • antennas (AntennaArrayState) – State of the device’s antenna array.

  • num_transmit_dsp_ports (int) – Number of digital transmit streams feeding into the device’s signal encoding layer. This is the number of streams expected to be generated by transmit DSP algorithms by default.

  • num_receive_dsp_ports (int) – Number of digital receive streams emerging from the device’s signal decoding layer. This the number of streams expected to be feeding into receive DSP algorithms by default.

  • num_transmit_rf_ports (int) – Number of digital ports feeding into the device’s RF front-end.

  • num_receive_rf_ports (int) – Number of digital ports emerging from the device’s RF front-end.

static Basic(num_digital_transmit_ports=1, num_digital_receive_ports=1, carrier_frequency=0.0, bandwidth=1.0, oversampling_factor=1, pose=None)[source]

Create a basic state initilized with default values.

Useful shorthand for debugging and testing.

Parameters:
  • num_digital_transmit_ports (int) – Number of digital transmit streams feeding into the device’s signal encoding layer. This is the number of streams expected to be generated by transmit DSP algorithms by default.

  • num_digital_receive_ports (int) – Number of digital receive streams emerging from the device’s signal decoding layer. This the number of streams expected to be feeding into receive DSP algorithms by default.

  • carrier_frequency (float) – Carrier frequency of the device in Hz. If not specified, base band is assumed.

  • bandwidth (float) – Bandwidth of the simulated base-band signal in Hz. The actual sampling rate is calculated as bandwidth * oversampling_factor. If not specified, 1 Hz is assumed.

  • oversampling_factor (int) – Oversampling factor of the simulated base-band signal. The actual sampling rate is calculated as bandwidth * oversampling_factor. If not specified, 1 is assumed.

  • pose (Transformation | None) – Pose of the device with respect to the global coordinate system. If not specified, the identity transformation is assumed, so the device is located in the origin.

Return type:

DeviceState

Returns: The initialized state.

receive_state(selected_digital_receive_ports=None)[source]

Generate a device state for reception.

Parameters:

selected_digital_receive_ports (Sequence[int] | None) – Indices of the selected digital receive ports. If not specified, all available receive ports will be considered.

Return type:

ReceiveState

transmit_state(selected_digital_transmit_ports=None)[source]

Generate a device state for transmission.

Parameters:

selected_digital_transmit_ports (Sequence[int] | None) – Indices of the selected digital transmit ports. If not specified, all available transmit ports will be considered.

Return type:

TransmitState

property device_id: int[source]

Unique identifier of the device this state represents.

property num_receive_dsp_ports: int[source]

Number of digital receive streams emerging from the device’s signal decoding layer.

This the number of streams expected to be feeding into receive DSP algorithms by default.

property num_receive_rf_ports: int[source]

Number of digital ports emerging from the device’s RF front-end.

property num_transmit_dsp_ports: int[source]

Number of digital transmit streams feeding into the device’s signal encoding layer.

This is the number of streams expected to be generated by transmit DSP algorithms by default.

property num_transmit_rf_ports: int[source]

Number of digital ports feeding into the device’s RF front-end.

property position: ndarray[source]

Global position of the device in cartesian coordinates.

Shorthand to the translation property of the pose property.

class TransmitState(timestamp, pose, velocity, carrier_frequency, bandwidth, oversampling_factor, antennas, num_transmit_dsp_ports, num_transmit_rf_ports)[source]

Bases: State

State of a during transmit signal processing.

Generated by calling the transmit_state method of a DeviceState.

Parameters:
  • timestamp (float) – Global timestamp of the device state.

  • pose (Transformation) – Pose of the device with respect to the global coordinate system.

  • velocity (ndarray) – Velocity of the device in m/s.

  • carrier_frequency (float) – Carrier frequency of the device in Hz.

  • bandwidth (float) – Bandwidth of the simulated base-band signal in Hz. The actual sampling rate is calculated as bandwidth * oversampling_factor.

  • oversampling_factor (int) – Oversampling factor of the simulated base-band signal. The actual sampling rate is calculated as bandwidth * oversampling_factor.

  • antennas (AntennaArrayState) – State of the device’s antenna array.

  • num_transmit_dsp_ports (int) – Number of digital transmit streams to be generated by the signal processing algorithm.

  • num_transmit_rf_ports (int) – Number of digital ports feeding into the device’s RF front-end.

property num_transmit_dsp_ports: int[source]

Number of digital transmit streams to be generated by the signal processing algorithm.

property num_transmit_rf_ports: int[source]

Number of digital ports feeding into the device’s RF front-end.

class ReceiveState(timestamp, pose, velocity, carrier_frequency, bandwidth, oversampling_factor, antennas, num_receive_dsp_ports, num_receive_rf_ports)[source]

Bases: State

State of a device during receive signal processing.

Generated by calling the receive_state method of a DeviceState.

Parameters:
  • timestamp (float) – Global timestamp of the device state.

  • pose (Transformation) – Pose of the device with respect to the global coordinate system.

  • velocity – Velocity of the device in m/s.

  • carrier_frequency (float) – Carrier frequency of the device in Hz.

  • bandwidth (float) – Bandwidth of the simulated base-band signal in Hz. The actual sampling rate is calculated as bandwidth * oversampling_factor.

  • oversampling_factor (int) – Oversampling factor of the simulated base-band signal. The actual sampling rate is calculated as bandwidth * oversampling_factor.

  • antennas (AntennaArrayState) – State of the device’s antenna array.

  • num_receive_dsp_ports (int) – Number of digital receive streams to be consumed by the signal processing algorithm.

  • num_receive_rf_ports (int) – Number of digital ports emerging from the device’s RF front-end.

property num_receive_dsp_ports: int[source]

Number of digital receive streams to be consumed by the signal processing algorithm.

property num_receive_rf_ports: int[source]

Number of digital ports emerging from the device’s RF front-end.

class DST[source]

Type variable for device states.

alias of TypeVar(‘DST’, bound=DeviceState)