def test_measure_segment_uhfli_has_correct_output(): expected_data = np.array([1, 2, 3, 4]) waveform = {'bla': 1, 'ble': 2, 'blu': 3} number_of_averages = 100 read_channels = [0, 1] with patch.object(zhinst.utils, 'create_api_session', return_value=3 * (MagicMock(),)), \ patch('qtt.measurements.scans.measure_segment_uhfli') as measure_segment_mock: uhfli_digitizer = ZIUHFLI('test', 'dev1234') measure_segment_mock.return_value = expected_data actual_data = measuresegment(waveform, number_of_averages, uhfli_digitizer, read_channels) np.testing.assert_array_equal(actual_data, expected_data) measure_segment_mock.assert_called_with(uhfli_digitizer, waveform, read_channels, number_of_averages) uhfli_digitizer.close()
return self.volt() / self.iv_conv * 1E12 if __name__ == '__main__': init_log = logging.getLogger(__name__) # import T10_setup as t10 config = Config('A:\qcodes_experiments\modules\Majorana\sample.config') # Initialisation of intruments qdac = QDAC_T10('qdac', 'ASRL6::INSTR', config, update_currents=False) lockin_topo = SR830_T10('lockin_topo', 'GPIB10::7::INSTR') lockin_left = SR830_T10('lockin_l', 'GPIB10::10::INSTR') lockin_right = SR830_T10('lockin_r', 'GPIB10::14::INSTR') zi = ZIUHFLI('ziuhfli', 'dev2189') # v1 = vna.ZNB20('VNA', 'TCPIP0::192.168.15.108::inst0::INSTR') sg1 = sg.RohdeSchwarz_SGS100A("sg1", "TCPIP0::192.168.15.107::inst0::INSTR") keysightgen_left = Keysight_33500B('keysight_gen_left', 'TCPIP0::192.168.15.101::inst0::INSTR') keysightgen_mid = Keysight_33500B('keysight_gen_mid', 'TCPIP0::192.168.15.114::inst0::INSTR') keysightgen_right = Keysight_33500B( 'keysight_gen_right', 'TCPIP0::192.168.15.109::inst0::INSTR') keysightdmm_top = Keysight_34465A_T10( 'keysight_dmm_top', 'TCPIP0::192.168.15.111::inst0::INSTR') keysightdmm_mid = Keysight_34465A_T10( 'keysight_dmm_mid', 'TCPIP0::192.168.15.112::inst0::INSTR') keysightdmm_bot = Keysight_34465A_T10(
def __init__(self, address: str, instrument_name: Optional[str] = None) -> None: super().__init__(address, instrument_name) self._instrument: ZIUHFLI = ZIUHFLI(self._instrument_name, device_ID=address)
grouping_1x8 = 2 awg.set_channel_grouping(grouping_1x8) output1_marker1 = 4 awg.triggers_out_4_source(output1_marker1) output2_marker1 = 6 awg.triggers_out_5_source(output2_marker1) sampling_rate_293KHz = 13 awg.awgs_0_time(sampling_rate_293KHz) # Initialize the lock-in amplifier lockin = ZIUHFLI(name='ZIUHFLI', device_ID='DEV2338') lockin.scope_trig_enable('ON') lockin.scope_trig_signal('Trig Input 1') lockin.scope_samplingrate('7.03 MHz') # Initialize the virtual AWG virtual_awg = VirtualAwg([awg], settings) marker_delay = 5.49e-4 virtual_awg.digitizer_marker_delay(marker_delay) marker_uptime = 1e-4
Created on Tue Jan 22 14:41:09 2019 @author: meso """ import numpy as np import time import qcodes as qc from qcodes.instrument_drivers.agilent.N5183B import N5183B from qcodes.instrument_drivers.ZI.ZIUHFLI import ZIUHFLI import matplotlib.pyplot as plt LOsignalgen = N5183B(name="LOgenerator", address="GPIB0::5::INSTR") RFsignalgen = N5183B(name="RFgenerator", address="GPIB0::19::INSTR") zilockin = ZIUHFLI(name="Lockin", device_ID='dev333') zilockin.demod1_R.get() #%% class heterodyne_readout(qc.MultiParameter): #For defining an instance that will return magnitude and phase of the ZI lockin at a fixed LO and RF frequency def __init__(self, lockin_instance): super().__init__( 'V_ac', names=('R', 'Theta'), shapes=((), ()), labels=('Magnitude ', 'Phase'), units=('V', 'rad'), setpoints=((), ()), docstring='Magnitude and Phase as gained from heterodyne detection'