Skip to content
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

Drivers for Zurich Instruments devices #90

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

thilokru
Copy link
Collaborator

This pull request does multiple things:

  • Fixes deprecationof Python API causing modern programming techniques not to work
  • Implement a generic driver for all zurich instruments devices with auto-discovery of features
  • Concrete implementation of a virtual VNA based on said devices.
  • Update README to include ALL required packages.

These features still need testing.

@thilokru
Copy link
Collaborator Author

The ZHInst_Waveforms are copied from zurich-instrument and might need to be removed befor a merge is possible.

return self._uhfqa.channels[channel].readout_frequency()

def _do_get_readout_amplitude(self, channel):
return self._uhfqa.channels[channel].readout_frequency()

Choose a reason for hiding this comment

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

readout amplitude anstelle von frequency

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Und das sind solche Bugs, wegen denen ich v2 geschrieben habe. Kümmere ich mich drum.

def _do_set_readout_frequency(self, frequency, channel):
self._uhfqa.channels[channel].readout_frequency(frequency)

def _do_set_readout_amplitude(self, amplitude, channel):

Choose a reason for hiding this comment

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

amplitude anstelle von frequency

return self._uhfqa.channels[channel].readout_frequency()

def _do_get_readout_amplitude(self, channel):
return self._uhfqa.channels[channel].readout_frequency()

Choose a reason for hiding this comment

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

amplitude anstelle von frequency

def _do_set_readout_frequency(self, frequency, channel):
self._uhfqa.channels[channel].readout_frequency(frequency)

def _do_set_readout_amplitude(self, amplitude, channel):

Choose a reason for hiding this comment

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

amplitude anstelle von frequency

@@ -733,7 +733,7 @@ def add_function(self, name, **options):
if hasattr(f, '__doc__'):
options['doc'] = getattr(f, '__doc__')

options['argspec'] = self.get_argspec_dict(inspect.getargspec(f))
options['argspec'] = self.get_argspec_dict(inspect.getfullargspec(f))

Choose a reason for hiding this comment

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

was passiert hier?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

getargspec is deprecated und hat nicht mehr funktioniert. Getfullargspec ist der empfohlene Ersatz und sollte als 1:1-Ersetzung funktionieren.

Returns (SHF-Upconversion center frequency, Digital Modulation Frequency)
"""
shfsg_out_freq = self.get_freqpoints()[0] - MINIMUM_UHFQA_FREQUENCY
base_mod = int(shfsg_out_freq / 0.5e9) * 0.5e9
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Bug: Does not check if base_mod exceeds center frequency range.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Bug: Check if total frequency does exceed SHFSG operational range.

out_channel.sine.q.cos.amplitude(0.0)
self.uhfqa.arm(length=self.repetitions, averages=1)

uhfqa_frequencies = self.get_freqpoints() - (self.get_freqpoints()[0] - MINIMUM_UHFQA_FREQUENCY)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Bug: If SHFSG frequency is not MINIMUM_UHFQA_FREQUENCY below lowest frequency point this calculation is incorrect.
Use Actual SHFSG frequency as reference instead.
Bonus: Check if UHFQA frequency range is exceeded.


for i, f in enumerate(uhfqa_frequencies):
self.uhfqa.set_osc_freq(f) # set modulation frequency
self.uhfqa.set_readout_frequency0(f)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This call costs time and might be unnecessary. In spectroscopy mode, the signal is (at least according to the documentation) automatically demodulated with the local oscillator.

for i, f in enumerate(uhfqa_frequencies):
self.uhfqa.nodetree.osc.freq(f) # set modulation frequency
for j in (0, 1):
self.uhfqa.set_readout_frequency(f, j)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This call costs time and might be unnecessary. In spectroscopy mode, the signal is (at least according to the documentation) automatically demodulated with the local oscillator.

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.

None yet

2 participants