Skip to main content

A communication library for interfacing with the KT-RTMS software.

Project description

rtms-python

Python communication library for the KT-RTMS software. You must have the KT-RTMS installed on a system with the Remote Control plug-in activated. Please contact Konrad Technologies for assistance.

Installing rtms-python

rtms-python can be installed using pip:

pip install konradtechnologies-rtms-python

Examples

Example Python scripts can be found in the examples/ folder.

Using rtms-python

The rtms-python package provides an overall class for communication to KT-RTMS, RtmsClient

# Instantiate the RTMS client object (does not connect yet)
rtms_client = RtmsClient(ip_address)

# Connect to the instrument
rtms_client.connect()
...
# Perform functions
...
# Disconnect from the instrument
rtms_client.disconnect()

Static Radar Targets

Static radar targets can be defined using the RadarTarget class and sent to the instrument.

# Create two radar targets
target_list = [RadarTarget(distance=35, rcs=15, velocity=0, azimuth=0, elevation=0),
               RadarTarget(distance=100, rcs=30, velocity=0, azimuth=0, elevation=0)]

# Send the targets to RTMS
rtms_client.set_radar_targets(target_list)

Dynamic Radar Targets

Dynamic radar targets can be defined using the DynamicRadarTarget class and executed by the Python script. In this configuration, Python sends a new set of targets to the instrument every 100 msec. This can achieve psuedo- dynamic linear targets.

# Create two dynamic targets
# The first target will move out from 20 m to 80 m at 10 m/sec, then back to 40 m at 20 m/sec.
moving_target_1 = [DynamicRadarTarget(start_x=0, start_y=20, end_x=0, end_y=80, rcs=30, velocity=10),
                   DynamicRadarTarget(start_x=0, start_y=80, end_x=0, end_y=40, rcs=30, velocity=20)]

# The second target will move from 100 m to 120 m at 5 m/sec.
moving_target_2 = [DynamicRadarTarget(start_x=0, start_y=100, end_x=0, end_y=120, rcs=30, velocity=5)]

# Send the targets to RTMS
rtms_client.set_dynamic_range_targets([moving_target_1, moving_target_2])

Note that since this script is executed by Python (and not by the KT-RTMS software), it may expirience jitter and latency, especially if other applications are running simultaneously.

Taking RF Measurements

If the KT-RTMS RF Measurements plug-in is activated on the system, one can take RF measurements. This is typically done in three steps: measurement configuration, initiating the measurement, and fetching results.

To configure the instrument for an RF measurement, there are typically a few parameters one should set:

  • Measurement duration
  • RF trigger parametesr
  • Specific measurement parameters
  • Enabling which specific measurements to take

As an example, this code sets the instrument up for a 1 msec acquisiton, measuring EIRP, occupied bandwidth, linearity, and phase noise of the signal:

# Set an acquisition time of 1 msec
rtms_client.set_measurement_duration(1E-3)

# Set up a rising edge trigger at 20 dBm
rtms_client.configure_trigger(enabled=True, level=20, edge=RtmsTriggerEdge.RISING)

# Configure the OBW and phase noise measurements
rtms_client.configure_measurement_obw_percent(percent=99)
rtms_client.configure_measurement_phasenoise(offset_frequencies=[10E3, 100E3, 1E6, 10E6])

# Set all measurements active
rtms_client.set_active_measurements(eirp=True, obw=True, linearity=True, phasenoise=True)

Then, once all the measurement configuration has been defined, one can initiate the measurement:

# Initiate the measurement and block until complete and results are ready
rtms_client.initiate_measurement(wait_until_complete=True)

Finally, the measurement results can be fetched. Each measurement result is returned as a dictionary of measurements.

# Fetch results
eirp_results = rtms_client.get_measurement_results_eirp()
print(eirp_results)

obw_results = rtms_client.get_measurement_results_obw()
print(obw_results)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

konradtechnologies-rtms-python-0.2.0.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file konradtechnologies-rtms-python-0.2.0.tar.gz.

File metadata

  • Download URL: konradtechnologies-rtms-python-0.2.0.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

File hashes

Hashes for konradtechnologies-rtms-python-0.2.0.tar.gz
Algorithm Hash digest
SHA256 828f82d367d26e92c6999148a07fa405c7debac859c4cc0375136eff97ebee26
MD5 8acc3c7205584fc6b4fe8f9ce4616c54
BLAKE2b-256 c44032aed413c4060a455919e23fe86a150ae4f512af3515799148649dfc44e5

See more details on using hashes here.

File details

Details for the file konradtechnologies_rtms_python-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: konradtechnologies_rtms_python-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 16.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

File hashes

Hashes for konradtechnologies_rtms_python-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fa90ebf2c2853cd11fd9bacc6830edc7b78911529f33a569334bc7da96ea774c
MD5 3b2024bc804746102d90e0211df2cdf3
BLAKE2b-256 5d2c2b33a3e719d7b497633e2021b0213137474f38f5e7ddbb6fa084f0275982

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page