Skip to content

Conversation

trlemon
Copy link
Contributor

@trlemon trlemon commented Sep 15, 2025

Summary of Changes

  • Added base class for Copper Mountain Technologies M5065 VNA driver.
  • Added subclass for M5065 driver (subclasses CMT M5xx base).
  • Added subclass for M5180
  • Added pyvisa-sim YAML for M5065
  • Added tests for M5065
  • Added example notebook for M5065

Notes

  • pyvisa-sim doesn't appear to be cooperating outside of driver instantiation and getting IDN, so tests are limited until those issues are resolved.
  • This driver was adapted from qcodes_contrib_drivers for the CMT M5180

@trlemon trlemon changed the title Tlemon/add copper mountain m5065 driver Add New Copper Mountain M5065 and M5180 Drivers Sep 15, 2025
Copy link

codecov bot commented Sep 15, 2025

Codecov Report

❌ Patch coverage is 50.00000% with 113 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.66%. Comparing base (e68ff37) to head (531bac6).

Files with missing lines Patch % Lines
...qcodes/instrument_drivers/CopperMountain/_M5xxx.py 48.14% 112 Missing ⚠️
.../qcodes/instrument_drivers/CopperMountain/M5180.py 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7497      +/-   ##
==========================================
- Coverage   59.73%   59.66%   -0.07%     
==========================================
  Files         347      350       +3     
  Lines       31242    31468     +226     
==========================================
+ Hits        18661    18774     +113     
- Misses      12581    12694     +113     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

s22_raw = self.ask("CALC1:TRAC4:DATA:FDAT?")

# Get data as numpy array
freq = np.fromstring(freq_raw, dtype=float, sep=",")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't this assume that format parameter is set to a certain value or does this work for all the formats?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This assumes that the data transfer format is ascii (which is the default). It will throw an error if the data transfer format is set to "real" or "real32".

self.instrument.write(f"CALC1:PAR1:DEF {self.name}")
self.instrument.trigger_source("bus") # set the trigger to bus
self.instrument.write("TRIG:SEQ:SING") # Trigger a single sweep
self.instrument.ask("*OPC?") # Wait for measurement to complete
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment about timeout here as well

self.instrument.ask("*OPC?") # Wait for measurement to complete

# get data from instrument
self.instrument.write("CALC1:TRAC1:FORM SMITH") # ensure correct format
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this ignore the format parameter defined in instrument's init? that'd be confusing for users, i beleive.

# get data from instrument
self.instrument.write("CALC1:TRAC1:FORM SMITH") # ensure correct format
sxx_raw = self.instrument.ask("CALC1:TRAC1:DATA:FDAT?")
self.instrument.write("CALC1:TRAC1:FORM MLOG")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is the format set to something and then data is not asked anymore?

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