Communication with Anritsu Lightning VNA
Project description
anritsu_lightning
Python interface to the Anritsu Lightning 37xxxD VNA
Installation
> pip install anritsu_lightning
Usage
>>> from anritsu_lightning import CommChannel
>>> with CommChannel(address=6) as vna:
... vna.ch3.parameter = "S21"
... s21 = vna.read(channel=3, data_status="corrected")
>>>
It is also possible to read the S-parameters in Touchstone SnP format.
>>> from anritsu_lightning import CommChannel
>>> with CommChannel(address=6) as vna:
... vna.measurement_setup.start = 40e6 # Hz
... vna.measurement_setup.stop = 20e9 # Hz
... vna.measurement_setup.data_points = 401
... vna.ch1.parameter = "S11"
... vna.ch1.graph_type = "log magnitude"
... vna.ch1.graph_scale = 20.0 # dB/div
... vna.ch2.parameter = "S12"
... vna.ch3.parameter = "S21"
... vna.ch3.graph_type = "log magnitude"
... vna.ch3.graph_scale = 2.0 # dB/div
... vna.ch4.parameter = "S22"
... vna.display_mode = "dual channels 1 & 3"
... with open(<file>, "wt") as f:
... f.write(vna.get_s2p(previous=False))
>>>
It is also possible to use the markers to find the -3 dB point of a filter. In this example, the VNA measured the -3 dB bandwidth of a Mini-Circuits VLF-1000+ low pass filter with nominal specification of 1.3 GHz. The VNA was already setup to measure S21 on channel 3 between 40 MHz and 5 GHz.
In [1]: from anritsu_lightning import CommChannel
In [2]: cc = CommChannel(address=6)
In [3]: vna = cc.get_instrument()
In [4]: vna.markers.mode = "normal"
In [5]: vna.markers.enable([1, 2])
In [6]: vna.markers.set_active(1)
In [7]: vna.markers.set_xaxis_location(1, "40 MHz")
In [8]: vna.markers.delta_reference = 1
In [9]: vna.markers.set_active(2)
In [10]: bw = vna.markers.search("-3 dB", reference="delta reference", timeout=5000)
In [11]: print(f"{bw/1e9:.2f} GHz")
1.26 GHz
Supported features:
- Measurement setup: frequency sweep, data points, etc.
- Channel setup: parameter (S11, S12, ...), graph type, etc.
- Graph setup: scale, reference, offset
- Data transfer: channel data, screen bitmap, S2P file
- Markers
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
anritsu_lightning-0.1.7.tar.gz
(12.0 kB
view details)
Built Distribution
File details
Details for the file anritsu_lightning-0.1.7.tar.gz
.
File metadata
- Download URL: anritsu_lightning-0.1.7.tar.gz
- Upload date:
- Size: 12.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7a30489fce5619b2c649d4e75f032a094c75b662a98aba1f87dbd3df9a88a75 |
|
MD5 | b72fa08e02581aa88f3ef1333a89af14 |
|
BLAKE2b-256 | e517ffef602551716b9c2247db5f8fca35b151b7a75251573397940eec51df11 |
File details
Details for the file anritsu_lightning-0.1.7-py3-none-any.whl
.
File metadata
- Download URL: anritsu_lightning-0.1.7-py3-none-any.whl
- Upload date:
- Size: 11.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0eaa4c3ec53d9c4c84af71a5392f001614f7e12f1b9d1a315eef93456aee18bc |
|
MD5 | 4d6240e15d00193625dc98ddc3930e07 |
|
BLAKE2b-256 | 44b375945efd2408b2037d8620ab73e5f58ba4b9cd12dbefe5548217ba86e198 |