Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- [nidmm (NI-DMM)](#nidmm-ni-dmm)
- [nifgen (NI-FGEN)](#nifgen-ni-fgen)
- [nimodinst (NI-ModInst)](#nimodinst-ni-modinst)
- [nirfsa (NI-RFSA)](#nirfsa-ni-rfsa)
- [nirfsg (NI-RFSG)](#nirfsg-ni-rfsg)
- [niscope (NI-SCOPE)](#niscope-ni-scope)
- [nise (NI Switch Executive)](#nise-ni-switch-executive)
Expand Down Expand Up @@ -1724,6 +1725,15 @@
- Initial release
---

### nirfsa (NI-RFSA)

- [Unreleased](#nirfsa-unreleased)

#### [nirfsa] Unreleased
- Added
- Changed
- Removed

### nirfsg (NI-RFSG)

- [Unreleased](#nirfsg-unreleased)
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
This is the MIT license: http://www.opensource.org/licenses/mit-license.php

Copyright (c) 2017-2022, National Instruments Corporation.
NI-Digital Pattern Driver, NI-DMM, NI-DCPower, NI-FGEN, NI-RFSG, NI-SCOPE, NI-SWITCH, NI Switch Executive,
NI-Digital Pattern Driver, NI-DMM, NI-DCPower, NI-FGEN, NI-RFSA, NI-RFSG, NI-SCOPE, NI-SWITCH, NI Switch Executive,
NI-ModInst, NI-TClk are trademarks of National Instruments.

Permission is hereby granted, free of charge, to any person obtaining a copy of this
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# In alphabetical order except put nifake first and nimodinst/nitclk last
# - nifake first to get the most code generator coverage
# - nimodinst last so that the version from nimodinst is used for any global versions (docs/conf.py)
ALL_DRIVERS := nifake nidcpower nidigital nidmm nifgen nirfsg niscope niswitch nise nimodinst nitclk
ALL_DRIVERS := nifake nidcpower nidigital nidmm nifgen nirfsa nirfsg niscope niswitch nise nimodinst nitclk
DRIVERS ?= $(ALL_DRIVERS)

ROOT_DIR := $(abspath .)
Expand Down
48 changes: 48 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,52 @@ NI-ModInst Python API Status



NI-RFSA Python API Status
-------------------------

+-------------------------------+-----------------------+
| NI-RFSA (nirfsa) | |
+===============================+=======================+
| Driver Version Tested Against | 2026 Q3 |
+-------------------------------+-----------------------+
| PyPI Version | |nirfsaLatestVersion| |
+-------------------------------+-----------------------+
| Supported Python Version | |nirfsaPythonVersion| |
+-------------------------------+-----------------------+
| Documentation | |nirfsaDocs| |
+-------------------------------+-----------------------+
| Open Issues | |nirfsaOpenIssues| |
+-------------------------------+-----------------------+
| Open Pull Requests | |nirfsaOpenPRs| |
+-------------------------------+-----------------------+


.. |nirfsaLatestVersion| image:: http://img.shields.io/pypi/v/nirfsa.svg
:alt: Latest NI-RFSA Version
:target: http://pypi.python.org/pypi/nirfsa


.. |nirfsaPythonVersion| image:: http://img.shields.io/pypi/pyversions/nirfsa.svg
:alt: NI-RFSA supported Python versions
:target: http://pypi.python.org/pypi/nirfsa


.. |nirfsaDocs| image:: https://readthedocs.org/projects/nirfsa/badge/?version=latest
:alt: NI-RFSA Python API Documentation Status
:target: https://nirfsa.readthedocs.io/en/latest


.. |nirfsaOpenIssues| image:: https://img.shields.io/github/issues/ni/nimi-python/nirfsa.svg
:alt: Open Issues + Pull Requests for NI-RFSA
:target: https://github.com/ni/nimi-python/issues?q=is%3Aopen+is%3Aissue+label%3Anirfsa


.. |nirfsaOpenPRs| image:: https://img.shields.io/github/issues-pr/ni/nimi-python/nirfsa.svg
:alt: Pull Requests for NI-RFSA
:target: https://github.com/ni/nimi-python/pulls?q=is%3Aopen+is%3Aissue+label%3Anirfsa



NI-RFSG Python API Status
-------------------------

Expand Down Expand Up @@ -533,6 +579,7 @@ Driver specific installation instructions can be found on **Read the Docs**:
* `nidmm <https://nidmm.readthedocs.io/en/latest/nidmm.html#installation>`_
* `nifgen <https://nifgen.readthedocs.io/en/latest/nifgen.html#installation>`_
* `nimodinst <https://nimodinst.readthedocs.io/en/latest/nimodinst.html#installation>`_
* `nirfsa <https://nirfsa.readthedocs.io/en/latest/nirfsa.html#installation>`_
* `nirfsg <https://nirfsg.readthedocs.io/en/latest/nirfsg.html#installation>`_
* `niscope <https://niscope.readthedocs.io/en/latest/niscope.html#installation>`_
* `nise <https://nise.readthedocs.io/en/latest/nise.html#installation>`_
Expand Down Expand Up @@ -591,6 +638,7 @@ Documentation is available on **Read the Docs**:
- https://nidmm.readthedocs.io
- https://nifgen.readthedocs.io
- https://nimodinst.readthedocs.io
- https://nirfsa.readthedocs.io
- https://nirfsg.readthedocs.io
- https://niscope.readthedocs.io
- https://nise.readthedocs.io
Expand Down
2 changes: 1 addition & 1 deletion build/templates/conf.py.mako
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ api_name = f"{config['driver_name']} Python API"
api_name_no_spaces_or_hyphens = api_name.replace(" ", "").replace("-", "")
api_name_no_spaces_or_hyphens_lower = api_name_no_spaces_or_hyphens.lower()

all_modules = {'nidcpower', 'nidigital', 'nidmm', 'nifgen', 'nimodinst', 'nirfsg', 'niscope', 'niswitch', 'nise', 'nitclk'}
all_modules = {'nidcpower', 'nidigital', 'nidmm', 'nifgen', 'nimodinst', 'nirfsa', 'nirfsg', 'niscope', 'niswitch', 'nise', 'nitclk'}
module_name = config['module_name']
external_modules = all_modules - {module_name}
%>\
Expand Down
1 change: 1 addition & 0 deletions docs/_static/documentation.inc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Documentation is available on **Read the Docs**:
- https://nidmm.readthedocs.io
- https://nifgen.readthedocs.io
- https://nimodinst.readthedocs.io
- https://nirfsa.readthedocs.io
- https://nirfsg.readthedocs.io
- https://niscope.readthedocs.io
- https://nise.readthedocs.io
Expand Down
1 change: 1 addition & 0 deletions docs/_static/installation.inc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Driver specific installation instructions can be found on **Read the Docs**:
* `nidmm <https://nidmm.readthedocs.io/en/latest/nidmm.html#installation>`_
* `nifgen <https://nifgen.readthedocs.io/en/latest/nifgen.html#installation>`_
* `nimodinst <https://nimodinst.readthedocs.io/en/latest/nimodinst.html#installation>`_
* `nirfsa <https://nirfsa.readthedocs.io/en/latest/nirfsa.html#installation>`_
* `nirfsg <https://nirfsg.readthedocs.io/en/latest/nirfsg.html#installation>`_
* `niscope <https://niscope.readthedocs.io/en/latest/niscope.html#installation>`_
* `nise <https://nise.readthedocs.io/en/latest/nise.html#installation>`_
Expand Down
8 changes: 8 additions & 0 deletions docs/_static/nirfsa_documentation.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.. _documentation-section:

Documentation
=============

Documentation is available `here <http://nirfsa.readthedocs.io>`_.


24 changes: 24 additions & 0 deletions docs/_static/nirfsa_usage.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Usage
------

The following is a basic example of using the **nirfsa** module to open a session to an RF Signal Analyzer and perform a spectrum acquisition.

.. code-block:: python

import nirfsa

# Configure the session
with nirfsa.Session(resource_name=resource_name, id_query=False, reset_device=False, options=options) as rfsa_session:
rfsa_session.acquisition_type = nirfsa.AcquisitionType.IQ

rfsa_session.reference_level = -10
rfsa_session.iq_carrier_frequency = 1e9
rfsa_session.number_of_samples = 1024
rfsa_session.iq_rate = 1e6

iq_data_array = np.zeros(number_of_samples, dtype=np.complex128)

wfm_info = rfsa_session.read_iq_single_record_into(iq_data_array)
# Perform measurements...

`Other usage examples can be found on GitHub. <https://github.com/ni/nimi-python/tree/master/src/nirfsa/examples>`_
1 change: 1 addition & 0 deletions docs/nidcpower/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ def setup(app):
'nidmm': ('https://nidmm.readthedocs.io/en/latest/', None),
'nifgen': ('https://nifgen.readthedocs.io/en/latest/', None),
'nimodinst': ('https://nimodinst.readthedocs.io/en/latest/', None),
'nirfsa': ('https://nirfsa.readthedocs.io/en/latest/', None),
'nirfsg': ('https://nirfsg.readthedocs.io/en/latest/', None),
'niscope': ('https://niscope.readthedocs.io/en/latest/', None),
'nise': ('https://nise.readthedocs.io/en/latest/', None),
Expand Down
1 change: 1 addition & 0 deletions docs/nidigital/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ def setup(app):
'nidmm': ('https://nidmm.readthedocs.io/en/latest/', None),
'nifgen': ('https://nifgen.readthedocs.io/en/latest/', None),
'nimodinst': ('https://nimodinst.readthedocs.io/en/latest/', None),
'nirfsa': ('https://nirfsa.readthedocs.io/en/latest/', None),
'nirfsg': ('https://nirfsg.readthedocs.io/en/latest/', None),
'niscope': ('https://niscope.readthedocs.io/en/latest/', None),
'nise': ('https://nise.readthedocs.io/en/latest/', None),
Expand Down
1 change: 1 addition & 0 deletions docs/nidmm/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ def setup(app):
'nidigital': ('https://nidigital.readthedocs.io/en/latest/', None),
'nifgen': ('https://nifgen.readthedocs.io/en/latest/', None),
'nimodinst': ('https://nimodinst.readthedocs.io/en/latest/', None),
'nirfsa': ('https://nirfsa.readthedocs.io/en/latest/', None),
'nirfsg': ('https://nirfsg.readthedocs.io/en/latest/', None),
'niscope': ('https://niscope.readthedocs.io/en/latest/', None),
'nise': ('https://nise.readthedocs.io/en/latest/', None),
Expand Down
1 change: 1 addition & 0 deletions docs/nifgen/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ def setup(app):
'nidigital': ('https://nidigital.readthedocs.io/en/latest/', None),
'nidmm': ('https://nidmm.readthedocs.io/en/latest/', None),
'nimodinst': ('https://nimodinst.readthedocs.io/en/latest/', None),
'nirfsa': ('https://nirfsa.readthedocs.io/en/latest/', None),
'nirfsg': ('https://nirfsg.readthedocs.io/en/latest/', None),
'niscope': ('https://niscope.readthedocs.io/en/latest/', None),
'nise': ('https://nise.readthedocs.io/en/latest/', None),
Expand Down
1 change: 1 addition & 0 deletions docs/nimodinst/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ def setup(app):
'nidigital': ('https://nidigital.readthedocs.io/en/latest/', None),
'nidmm': ('https://nidmm.readthedocs.io/en/latest/', None),
'nifgen': ('https://nifgen.readthedocs.io/en/latest/', None),
'nirfsa': ('https://nirfsa.readthedocs.io/en/latest/', None),
'nirfsg': ('https://nirfsg.readthedocs.io/en/latest/', None),
'niscope': ('https://niscope.readthedocs.io/en/latest/', None),
'nise': ('https://nise.readthedocs.io/en/latest/', None),
Expand Down
51 changes: 51 additions & 0 deletions docs/nirfsa/.readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Why Use A Configuration File?
# https://docs.readthedocs.io/en/stable/config-file/index.html
# The main advantages of using a configuration file over the web interface are:
# * Settings are per version rather than per project.
# * Settings live in your VCS.
# * They enable reproducible build environments over time.
# * Some settings are only available using a configuration file

# Required
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.11"
jobs:
# pre_build:
# # Check for broken external links
# - python -m sphinx -b linkcheck -D linkcheck_timeout=1 docs/ _build/linkcheck
post_checkout:
# https://docs.readthedocs.io/en/stable/build-customization.html#cancel-build-based-on-a-condition
# Build-cancellation rules are recommended for monorepos.
# Cancel building pull requests when there aren't changes in any of these paths: docs/_static/ docs/nirfsa/.
#
# If there are no changes (git diff exits with 0) we force the command to return with 183.
# This is a special exit code on Read the Docs that will cancel the build immediately.
- |
if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && git diff --quiet origin/master -- docs/_static/ docs/nirfsa/;
then
exit 183;
fi

# Have Read the Docs build documentation with Sphinx
sphinx:
builder: html
configuration: docs/nirfsa/conf.py

# If using Sphinx, optionally build your docs in additional formats such as PDF
formats:
- epub
- pdf

# Declare the Python requirements required to build your docs
python:
install:
- requirements: docs/requirements.txt
15 changes: 15 additions & 0 deletions docs/nirfsa/about_nirfsa.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.. _about-section:

About
=====

The **nirfsa** module provides a Python API for NI-RFSA. The code is maintained in the Open Source repository for `nimi-python <https://github.com/ni/nimi-python>`_.

Support Policy
--------------
**nirfsa** supports all the Operating Systems supported by NI-RFSA.

It follows `Python Software Foundation <https://devguide.python.org/#status-of-python-branches>`_ support policy for different versions of CPython.

NI created and supports **nirfsa**.

Loading