8000 Add Keysight E5071C VNA to the PyMeasure Builtin Instruments by Sionwage · Pull Request #1154 · pymeasure/pymeasure · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add Keysight E5071C VNA to the PyMeasure Builtin Instruments #1154

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 55 commits into
base: master
Choose a base branch
from

Conversation

Sionwage
Copy link
Contributor
@Sionwage Sionwage commented Aug 19, 2024

Working towards incorporating the Keysight E5071C VNA into PyMeasure's builtin instruments. These commands should be compatible with other Keysight VNA's such as the E5060, E5061, E5070, E5071, and the various revisions of each.

This PR is not complete yet and needs more work to finish in a few areas. Creating the PR to get ready for later integration.

Items needing to be addressed:

I haven't checked but I am 99% sure I need to update the PR to merge recent commits into my fork.

pymeasure/docs

  • Need way to display ASCII art of how the channel/trace layouts display on the VNA screen in the docstring. More specifically, it would be nice to have the ASCII art rendered when calling help() for the display_layout command in python to know how the display would get split and what options are available.

pymeasure/instruments/keysight/keysightE5071C.py

  • Some docstrings need to be converted to work with Sphinx and match project formatting
  • Some docstrings do not respect the ['Get', 'Set', 'Read', 'Control'] requirement
  • Want to add ability to write data arrays into memory to display on the VNA during acquisition.
    • Need to figure out how to manipulate data arrays to properly format for writing them to the VNA. Might be able to use `set_process to format the data into the correct string or binary format for writing the array to the VNA.
    • Want to be able to duplicate this for reading and writing calibration standard definitions to the VNA to add, verify, and correct calibration kit definitions if others have changed and most likely corrupted these unknowingly.
    • Want to again use this for reading and writing to the calibration offsets directly for various calibration methods. (Nice for validating Scikit-RF calibration correction tables against the VNA or loading a calibration table without needing to rely on performing the calibration on the VNA itself while having corrected traces displayed on the VNA while taking a measurement.)
  • Probably need to fix command names to match other VNA commands used for consistency.
  • Probably need to fix defining the placeholder for classes called with in the channel class for traces, ports, markers, and reference marker.
  • Need a way to decorate certain commands to check if a specific channel, trace, marker, ref_marker is active before calling the command to ensure it gets applied to the indicated item. Otherwise using the @property and @<def name>.setter method used in TraceCommands for making sure the trace is active for a channel to apply a measurement format.
  • Need the VNA Option Values dictionary populated against the Keysight datasheet to define min and max frequency limits when initializing VNA instrument in python.
  • Some commands might need to be rewritten to use the @property getter and setter so the functions don't get accidentally overwritten with bad commands utilizing the instrument.
  • Need method to send/receive files over GPIB to take screenshots on the VNA of a trace and save them to the computer (sometimes customers want the raw screenshot for QA purposes)
  • Need method to perform power sweeps (would also like a way to perform a power calibration by measuring the VNA with a power meter in pymeasure so I don't have the VNA trying to use its own GPIB/USB SCPI controller to correct its output power)
  • Could be nice to have the getter/setter for traces/markers/channels switch to the necessary property for the task and switch back to the original trace/marker/channel afterwards.
  • Certain properties such as MEASUREMENT_FORMAT it would be nice to be able to part of the value to set it like how SCPI uses just the UPPERCASE letters for the command and can accept the lowercase letters as long as they are correct.
  • Need to modify how arrays are read from the VNA/written to the VNA based on the data_transfer_format being either ASCII or binary IEEE 32bit or 64bit floating points values plus a header.

pymeasure/tests/instruments/keysight/test_keysightE5071c.py

  • Need tests written for verifying instrument with pytest both with and without a VNA to test against.
  • Need to create basic tests to verify commands written for the various classes
  • Need to learn how to parameterize the tests to verify the channels, traces, markers to catch issues for how the VNA is configured (the VNA can be configured manually to allow different number of channels and traces and points per channel)
  • Probably can use the OPTION_VALUES from keysightE5071c.py to ensure the spread of parameterized values tested will pass or fail

pymeasure/tests/instruments/keysight/test_keysightE5071c_with_device.py

  • Need to expand this test to aid in validating the tests without the VNA above.

sibling VNAs

  • I should take a look at the E5060/1, E5070, and E5090/1 and look into creating basic instrument classes for these with their associated options to initialize these too with their min/max frequency limits and other bound-able properties.

Any other feedback, suggestions, or required changes needed will be appreciated.

Sionwage added 30 commits June 11, 2024 14:36
@BenediktBurger
Copy link
Member

Hey @Sionwage , thanks for the pull request.

It is a large change (almost 2000 lines) and you think about including base classes for other VNAs etc.

If you find any logical separation for several pull requests, that would be great (e.g. the base class), as it reduces review effort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0