Skip to main content
Info Contains Python APIs for interacting with RFmx WCDMA Product.
Author National Instruments

Table of Contents

About

The nirfmx-python repository generates Python bindings (Application Programming Interface) for interacting with the RFmx Products.

nirfmx-python follows Python Software Foundation support policy for different versions.

RFmx Instr Python API Status

Item Details
Driver Version Tested 2026 Q4
Supported Python Versions Python 3.9+ (64-bit)
Documentation RFmx Instr Docs

RFmx WCDMA Python API Status

Item Details
Driver Version Tested 2026 Q4
Supported Python Versions Python 3.9+ (64-bit)
Documentation RFmx WCDMA Docs

Documentation

You can find the latest API documentation for the nirfmx-python package on Read the Docs

Refer to the RFmx User Manual for an overview of RFmx, system requirements, troubleshooting, key concepts, etc.

Operating System Support

nirfmx-python supports Windows systems where the supported drivers are installed. Refer to NI Hardware and Operating System Compatibility for which versions of the driver support your hardware on a given operating system.

Installation

You can use pip to download nirfmxwcdma and install it.

$ python -m pip install nirfmxwcdma

To also install gRPC support for remote NI gRPC Device Server communication:

$ python -m pip install "nirfmxwcdma[grpc]"

License

This project is licensed under the MIT License. While the source code is not publicly released, the license permits binary distribution with attribution.

Note: This Python driver depends on several third-party components that are subject to separate commercial licenses. Users are responsible for ensuring they have the appropriate rights and licenses to use those dependencies in their environments.

gRPC Features

For driver APIs that support it, passing a GrpcSessionOptions instance as a parameter to nirfmxinstr.Session.init() is subject to the NI General Purpose EULA.

SSL/TLS Support

The server supports both server-side TLS and mutual TLS. Security configuration is accomplished by setting the server_cert, server_key and root_cert values in the server's configuration file. The server expects the certificate files specified in the configuration file to exist in a certs folder that is located in the same directory as the configuration file being used by the server. For more detailed information on SSL/TLS support refer to the Server Security Support wiki page.

Support and Feedback

For support with Python API, hardware, the driver runtime or any other questions, please visit NI Community Forums.

RFmxWCDMA Example

import nirfmxinstr
import nirfmxwcdma
import numpy

instr_session = None
wcdma = None

try:
    # Create a new RFmx Session
    instr_session = nirfmxinstr.Session(resource_name="RFSA", option_string="")

    # Get WCDMA signal
    wcdma = instr_session.get_wcdma_signal_configuration()

    # Configure RFmx Session
    instr_session.configure_frequency_reference(selector_string="",
        frequency_reference_source="OnboardClock", frequency_reference_frequency=10.0e6)

    # Configure WCDMA signal
    wcdma.configure_rf(selector_string="", center_frequency=1.95e9, reference_level=0.0,
        external_attenuation=0.0)
    wcdma.configure_digital_edge_trigger(
        selector_string="",
        digital_edge_source="PFI0",
        digital_edge=nirfmxwcdma.DigitalEdgeTriggerEdge.RISING_EDGE,
        trigger_delay=0.0,
        enable_trigger=False,
    )
    wcdma.configure_contiguous_carriers(selector_string="", num_carriers=2,
        carrier_at_center_frequency=-1)

    # Select ACP Measurement
    wcdma.select_measurements(selector_string="",
        measurements=nirfmxwcdma.MeasurementTypes.ACP, enable_all_traces=True)

    # Configure ACP Measurement
    wcdma.acp.configuration.configure_averaging(
        selector_string="",
        averaging_enabled=nirfmxwcdma.AcpAveragingEnabled.FALSE,
        averaging_count=10,
        averaging_type=nirfmxwcdma.AcpAveragingType.RMS,
    )
    wcdma.acp.configuration.configure_sweep_time(selector_string="",
        sweep_time_auto=nirfmxwcdma.AcpSweepTimeAuto.TRUE, sweep_time_interval=6.67e-4)

    wcdma.initiate(selector_string="", result_name="")

    # Retrieve Results
    absolute_power, relative_power, error_code = wcdma.acp.results.fetch_carrier_measurement_array(
        selector_string="", timeout=10.0
    )

    (
        lower_relative_power,
        upper_relative_power,
        lower_absolute_power,
        upper_absolute_power,
        error_code,
    ) = wcdma.acp.results.fetch_offset_measurement_array(selector_string="", timeout=10.0)

    # The numpy arrays are passed in pre-allocated. If the pre allocated array size does not match the
    # actual array size returned by the measurement, the array is automatically resized to fit the data,
    # which may invalidate the previously created view. Passing an empty array (size 0) is fine;
    # it will be resized as needed.
    spectrum = numpy.empty(0, dtype=numpy.float32)
    x0, dx, error_code = wcdma.acp.results.fetch_spectrum(selector_string="", timeout=10.0,
        spectrum=spectrum)

    # Print Results
    print("------------------Carrier Measurements------------------")
    for i in range(len(absolute_power)):
        print(f"Carrier {i}")
        print(f"Absolute Power (dBm)               : {absolute_power[i]}")
        print(f"Relative Power (dB)                : {relative_power[i]}")

    print("\n------------------Offset Measurements------------------")
    for i in range(len(lower_relative_power)):
        print(f"Offset {i}")
        print(f"Lower Relative Power (dB)          : {lower_relative_power[i]}")
        print(f"Upper Relative Power (dB)          : {upper_relative_power[i]}")
        print(f"Lower Absolute Power (dBm)         : {lower_absolute_power[i]}")
        print(f"Upper Absolute Power (dBm)         : {upper_absolute_power[i]}")

except Exception as e:
    print("ERROR: " + str(e))

finally:
    # Close Session
    if wcdma is not None:
        wcdma.dispose()
        wcdma = None
    if instr_session is not None:
        instr_session.close()
        instr_session = None

Numpy array size handling in RFmx APIs

The numpy arrays are passed in pre-allocated. If the pre allocated array size does not match the actual array size returned by the measurement, the array is automatically resized to fit the data, which may invalidate the previously created view. Passing an empty array (size 0) is fine; it will be resized as needed.

Metadata

Release files for nirfmxwcdma 26.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for nirfmxwcdma 26.8.0
File Interpreter ABI Platform
nirfmxwcdma-26.8.0-py3-none-any.whl Python 3 none any Details

Release files / nirfmxwcdma-26.8.0-py3-none-any.whl

Download URL nirfmxwcdma-26.8.0-py3-none-any.whl
Size 260.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9c363eb296242de39fd0f4b25b9f9f044e86d0212dc61265f21ed1e27dc8cd32
BLAKE2b-256 checksum
How to use checksums
c3b18a53f7be5f72cbb384567760438cdad76856272aca8628576fabdb946edb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.11

Security for nirfmxwcdma 26.8.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

26.8.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page