Skip to main content

A small package aimed at helping with interfacing with Agilent spectrum analyzer (tested with ESA and EXA series)

Project description

agilent_visa_control

A set of files aimed at facilitating the transfer of data from Agilent Spectrum Analizers through VISA Interface

Prerequisites:

You will need PyVisa (and PyVisa's dependencies too obviously).

Installation:

No need to install, just clone this repository to your working workspace folder and code inside of it.

For a good example on how to use the code check Agilent_save_trace.py

Frequency.py is a helper class to help you deal with frequencies and its conversion. You can by using this class just sum or substract frequencies and the units will be taken care of by the script. You can then convert to which ever frequency unit you need. Check Frequency.py for examples on usage (after if __name__ == __main__:)

Usage of Agilent class:

Before using this class you will need to know the VISA identifier of the Agilent Spectrum Analyzer you'll want to use. The identifier is usually found on the IO Librairies Suite of KeySight (https://www.keysight.com/en/pd-1985909/io-libraries-suite) (This suite is usually needed for communication with the Spectrum Analyzer) or in the instrument panel of your VISA package.

It is something like

identifier = "GPIB0::8::INSTR"

Once you know your identifier you will need to create the Agilent class object:

agilent = Agilent(identifier)

Then you need to open your connection:

agilent.open()

Then you could set the mode of the Analyzer, for example you could choose the spectrum analyzer mode. As of today the code only supports setting this mode remotely. You could always set in some other mode using the Frontal Interface on the instrument and then carry on extracting the data with this library.

agilent.set_sa()

Then you create the frequencies at which you want to center and the span of the analyzer.

center_freq = Frequency(80.1, FreqUnit(FreqUnit.MHz))
span = Frequency(50, FreqUnit(FreqUnit.kHz))

And we set the x Axis:

agilent.set_x(center_freq, span)

We set the Y axis now:

agilent.set_y(3, 10) #in dBm (first argument is the reference Level and the second one is the scale in dBm per Div.

You can also set markers:

agilent.set_marker(1, center_freq)

And in the end we extract the values:

values = agilent.get_trace(1)
#treat values

And in the end we close the connection.

#close connection once you are done with the agilent Spectrum Analyzer
agilent.close()

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

agilent-visa-control-0.0.2.1.2.tar.gz (16.9 kB view details)

Uploaded Source

Built Distribution

agilent_visa_control-0.0.2.1.2-py3-none-any.whl (30.4 kB view details)

Uploaded Python 3

File details

Details for the file agilent-visa-control-0.0.2.1.2.tar.gz.

File metadata

  • Download URL: agilent-visa-control-0.0.2.1.2.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for agilent-visa-control-0.0.2.1.2.tar.gz
Algorithm Hash digest
SHA256 c0daeef86447dc5bf9f7401cae5e27c61fdeabdd664d647b9ac11c5bbd268bee
MD5 3cc08d1f30aba91a019d191d2543c83a
BLAKE2b-256 9f587546821e1b8a8c76f62fad844f71e807eeee27cce6b9a625bfd22c9c5f07

See more details on using hashes here.

File details

Details for the file agilent_visa_control-0.0.2.1.2-py3-none-any.whl.

File metadata

  • Download URL: agilent_visa_control-0.0.2.1.2-py3-none-any.whl
  • Upload date:
  • Size: 30.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for agilent_visa_control-0.0.2.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1978f12eff53e7d7db2e34573167fe63873599e772cbc3357186004faa74ed49
MD5 d034912f1cf2f2ea054f586aa82f7402
BLAKE2b-256 7f520fcf2fad114807a394c7210c833dfdb715bf2ff6e7345f22897e0375dffa

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