| **Info** | Contains Python APIs for interacting with NI-RFmx drivers. |
| :------------ | :----------------------------------------------------------|
| **Author** | National Instruments |
# Table of Contents
- [Table of Contents](#table-of-contents)
- [About](#about)
- [Documentation](#documentation)
- [Operating System Support](#operating-system-support)
- [Installation](#installation)
- [License](#license)
- [Support and Feedback](#support-and-feedback)
- [Example](#example)
# About
The **nirfmx-python** repository generates Python bindings (Application Programming Interface)
for interacting with the NI-RFmx drivers.
**nirfmx-python** follows [Python Software Foundation](https://devguide.python.org/#status-of-python-branches)
support policy for different versions.
The following drivers are supported:
* RFmx Instr (Python module: nirfmxinstr)
* RFmx SpecAn (Python module: nirfmxspecan)
## RFmx Instr Python API Status
| Item | Details |
|------------------------------|-------------------------------|
| **Driver Version Tested** | [2025 Q3](http://www.ni.com/downloads/) |
| **PyPI Package Version** | v19.1 |
| **Supported Python Versions**| Python 3.9+ (64-bit) |
| **Documentation** | [RFmx Instr Docs](https://nirfmxinstr.readthedocs.io/en/latest) |
## RFmx SpecAn Python API Status
| Item | Details |
|------------------------------|-------------------------------|
| **Driver Version Tested** | [2025 Q3](http://www.ni.com/downloads/) |
| **PyPI Package Version** | v19.1 |
| **Supported Python Versions**| Python 3.9+ (64-bit) |
| **Documentation** | [RFmx SpecAn Docs](https://nirfmxspecan.readthedocs.io/en/latest) |
## Documentation
You can find the latest API documentation for the **nirfmx-python** package
on [Read the Docs](http://nirfmx-python.readthedocs.io/en/latest)
Refer to the [NI-RFmx User Manual](https://www.ni.com/docs/en-US/bundle/rfmx/page/user-manual-welcome.html)
for an overview of NI-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](https://www.ni.com/r/hw-support) for
which versions of the driver support your hardware on a given operating system.
# Installation
You can use [pip](http://pypi.python.org/pypi/pip) to download
[nirfmxinstr](https://pypi.org/project/nirfmxinstr/), [nirfmxspecan](https://pypi.org/project/nirfmxspecan/)
and install it.
$ python -m pip install nirfmxspecan
# 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.
# Support and Feedback
For support with Python API, hardware, the driver runtime or any other questions,
please visit [NI Community Forums](https://forums.ni.com/).
# Example
```python
import nirfmxinstr
import nirfmxspecan
import numpy
try:
# Open a RFmx Session
instr_session = nirfmxinstr.Session(resource_name="RFSA", option_string="")
# Configure RFmx Session
instr_session.configure_frequency_reference(selector_string="",
frequency_reference_source="OnboardClock", frequency_reference_frequency=10.0e+6)
# Create SpecAn Signal
specan = instr_session.get_specan_signal_configuration()
# Configure SpecAn Signal
specan.set_selected_ports(selector_string="", value="")
specan.configure_frequency(selector_string="", center_frequency=1e+9)
specan.configure_reference_level(selector_string="", reference_level=0.0)
specan.configure_external_attenuation(selector_string="", external_attenuation=0.0)
# Select Spectrum Measurement
specan.select_measurements(selector_string="",
measurements=nirfmxspecan.MeasurementTypes.SPECTRUM.value, enable_all_traces=True)
# Configure Spectrum Measurement
specan.spectrum.configuration.configure_span(selector_string="", span=1.0e+6)
specan.spectrum.configuration.configure_measurement_method(selector_string="",
measurement_method=nirfmxspecan.SpectrumMeasurementMethod.NORMAL.value)
specan.initiate(selector_string="", result_name="")
# Retrieve Results
spectrum = numpy.empty(0, dtype=numpy.float32)
x0, dx, _ = specan.spectrum.results.fetch_spectrum(selector_string="", timeout=10.0, spectrum=spectrum)
peak_amplitude, peak_frequency, frequency_resolution, error_code = (
specan.spectrum.results.fetch_measurement(selector_string="", timeout=10.0))
# Print Results
print(f"Peak Amplitude (dBm) {peak_amplitude}")
print(f"Peak Frequency (Hz) {peak_frequency}")
except nirfmxinstr.RFmxError as e:
print("ERROR: " + str(e.description))
finally:
# Dispose Signal & Session
if specan is not None:
specan.dispose()
specan = None
if instr_session is not None:
instr_session.close()
instr_session = None
```
Raw data
{
"_id": null,
"home_page": "https://github.com/ni/nirfmx-python",
"name": "nirfmxspecan",
"maintainer": "NI",
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": "opensource@ni.com",
"keywords": "nirfmxspecan",
"author": "NI",
"author_email": "opensource@ni.com",
"download_url": null,
"platform": null,
"description": "| **Info** | Contains Python APIs for interacting with NI-RFmx drivers. |\n| :------------ | :----------------------------------------------------------|\n| **Author** | National Instruments |\n\n# Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [About](#about)\n - [Documentation](#documentation)\n - [Operating System Support](#operating-system-support)\n- [Installation](#installation)\n- [License](#license)\n- [Support and Feedback](#support-and-feedback)\n- [Example](#example)\n\n\n# About\n\nThe **nirfmx-python** repository generates Python bindings (Application Programming Interface)\nfor interacting with the NI-RFmx drivers.\n\n**nirfmx-python** follows [Python Software Foundation](https://devguide.python.org/#status-of-python-branches)\nsupport policy for different versions.\n\nThe following drivers are supported:\n\n* RFmx Instr (Python module: nirfmxinstr)\n* RFmx SpecAn (Python module: nirfmxspecan)\n\n\n## RFmx Instr Python API Status\n\n| Item | Details |\n|------------------------------|-------------------------------|\n| **Driver Version Tested** | [2025 Q3](http://www.ni.com/downloads/) |\n| **PyPI Package Version** | v19.1 |\n| **Supported Python Versions**| Python 3.9+ (64-bit) |\n| **Documentation** | [RFmx Instr Docs](https://nirfmxinstr.readthedocs.io/en/latest) |\n\n\n## RFmx SpecAn Python API Status\n\n| Item | Details |\n|------------------------------|-------------------------------|\n| **Driver Version Tested** | [2025 Q3](http://www.ni.com/downloads/) |\n| **PyPI Package Version** | v19.1 |\n| **Supported Python Versions**| Python 3.9+ (64-bit) |\n| **Documentation** | [RFmx SpecAn Docs](https://nirfmxspecan.readthedocs.io/en/latest) |\n\n\n## Documentation\n\nYou can find the latest API documentation for the **nirfmx-python** package\non [Read the Docs](http://nirfmx-python.readthedocs.io/en/latest)\n\nRefer to the [NI-RFmx User Manual](https://www.ni.com/docs/en-US/bundle/rfmx/page/user-manual-welcome.html)\nfor an overview of NI-RFmx, system requirements, troubleshooting, key concepts, etc.\n\n\n## Operating System Support\n\n**nirfmx-python** supports Windows systems where the supported drivers are \ninstalled. Refer to [NI Hardware and Operating System Compatibility](https://www.ni.com/r/hw-support) for \nwhich versions of the driver support your hardware on a given operating system.\n\n\n# Installation\n\nYou can use [pip](http://pypi.python.org/pypi/pip) to download\n[nirfmxinstr](https://pypi.org/project/nirfmxinstr/), [nirfmxspecan](https://pypi.org/project/nirfmxspecan/)\nand install it.\n \n $ python -m pip install nirfmxspecan\n\n\n# License\n\nThis project is licensed under the MIT License. While the source code is not publicly released,\nthe license permits binary distribution with attribution.\n\n**Note:** This Python driver depends on several third-party components that are subject to separate\ncommercial licenses. Users are responsible for ensuring they have the appropriate rights and licenses\nto use those dependencies in their environments.\n\n\n# Support and Feedback\n\nFor support with Python API, hardware, the driver runtime or any other questions,\nplease visit [NI Community Forums](https://forums.ni.com/).\n\n\n# Example\n```python\nimport nirfmxinstr\nimport nirfmxspecan\nimport numpy\n\ntry:\n # Open a RFmx Session\n instr_session = nirfmxinstr.Session(resource_name=\"RFSA\", option_string=\"\")\n\n # Configure RFmx Session\n instr_session.configure_frequency_reference(selector_string=\"\",\n frequency_reference_source=\"OnboardClock\", frequency_reference_frequency=10.0e+6)\n\n # Create SpecAn Signal\n specan = instr_session.get_specan_signal_configuration()\n\n # Configure SpecAn Signal\n specan.set_selected_ports(selector_string=\"\", value=\"\")\n specan.configure_frequency(selector_string=\"\", center_frequency=1e+9)\n specan.configure_reference_level(selector_string=\"\", reference_level=0.0)\n specan.configure_external_attenuation(selector_string=\"\", external_attenuation=0.0)\n\n # Select Spectrum Measurement\n specan.select_measurements(selector_string=\"\",\n measurements=nirfmxspecan.MeasurementTypes.SPECTRUM.value, enable_all_traces=True)\n\n # Configure Spectrum Measurement\n specan.spectrum.configuration.configure_span(selector_string=\"\", span=1.0e+6)\n specan.spectrum.configuration.configure_measurement_method(selector_string=\"\",\n measurement_method=nirfmxspecan.SpectrumMeasurementMethod.NORMAL.value)\n\n specan.initiate(selector_string=\"\", result_name=\"\")\n\n # Retrieve Results\n spectrum = numpy.empty(0, dtype=numpy.float32)\n x0, dx, _ = specan.spectrum.results.fetch_spectrum(selector_string=\"\", timeout=10.0, spectrum=spectrum)\n peak_amplitude, peak_frequency, frequency_resolution, error_code = (\n specan.spectrum.results.fetch_measurement(selector_string=\"\", timeout=10.0))\n\n # Print Results\n print(f\"Peak Amplitude (dBm) {peak_amplitude}\")\n print(f\"Peak Frequency (Hz) {peak_frequency}\")\n\nexcept nirfmxinstr.RFmxError as e:\n print(\"ERROR: \" + str(e.description))\n\nfinally:\n # Dispose Signal & Session\n if specan is not None:\n specan.dispose()\n specan = None\n if instr_session is not None:\n instr_session.close()\n instr_session = None\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python APIs for interacting with NI-RFmx drivers",
"version": "25.5.0",
"project_urls": {
"Documentation": "https://nirfmxspecan.readthedocs.io/",
"Homepage": "https://github.com/ni/nirfmx-python",
"Repository": "https://github.com/ni/nirfmx-python"
},
"split_keywords": [
"nirfmxspecan"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "3d01710edf1575d37719671d02f5a2f6ee6d03632168f9f985501bd737fe6065",
"md5": "14d63077d1409ba3cb71a11752a878cd",
"sha256": "b7c523be28d78d1a67a6ff2e4ccabf6fb86d00780684519a8bab5912f9a2be8d"
},
"downloads": -1,
"filename": "nirfmxspecan-25.5.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "14d63077d1409ba3cb71a11752a878cd",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 434936,
"upload_time": "2025-07-29T15:46:20",
"upload_time_iso_8601": "2025-07-29T15:46:20.569735Z",
"url": "https://files.pythonhosted.org/packages/3d/01/710edf1575d37719671d02f5a2f6ee6d03632168f9f985501bd737fe6065/nirfmxspecan-25.5.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-29 15:46:20",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ni",
"github_project": "nirfmx-python",
"github_not_found": true,
"lcname": "nirfmxspecan"
}