def pulse_gates_2d(self, gates, sweep_ranges, period, resolution, do_upload=True): """ Supplies square signals to a linear combination of gates, which effectively does a 2D scan. Arguments: gates (list[dict]): A list containing two dictionaries with both the the gate name keys and relative amplitude values. sweep_ranges (list): A list two overall amplitude of the square signal in millivolt in the x- and y-direction. period (float): The period of the square signals in seconds. resolution (list): Two integer values with the number of square signal (pixels) in the x- and y-direction. do_upload (bool, Optional): Does not upload the waves to the AWG's when set to False. Returns: A dictionary with the properties of the square signals; the original square sequence, the sweep ranges, the marker properties and period of the square signals. Example: >> sec_period = 1e-6 >> resolution = [10, 10] >> mV_sweep_ranges = [100, 100] >> gates = [{'P4': 1}, {'P7': 0.1}] >> sweep_data = virtual_awg.pulse_gates_2d(gates, mV_sweep_ranges, period, resolution) """ sequences = {} sequences.update(self.make_markers(period)) period_x = resolution[0] * period for gate_name_x, rel_amplitude_x in gates[0].items(): amplitude_x = rel_amplitude_x * sweep_ranges[0] pulse_wave_x = Sequencer.make_square_wave(amplitude_x, period_x, resolution[1]) sequences.setdefault(gate_name_x, []).append(pulse_wave_x) period_y = resolution[0] * resolution[1] * period for gate_name_y, rel_amplitude_y in gates[1].items(): amplitude_y = rel_amplitude_y * sweep_ranges[1] pulse_wave_y = Sequencer.make_square_wave(amplitude_y, period_y) sequences.setdefault(gate_name_y, []).append(pulse_wave_y) sweep_data = self.sequence_gates(sequences, do_upload) sweep_data.update({'sweeprange_horz': sweep_ranges[0], 'sweeprange_vert': sweep_ranges[1], 'resolution': resolution, 'period': period_x, 'period_vert': period_y, 'samplerate': self.awgs[0].retrieve_setting('channel_sampling_rate'), 'markerdelay': self.awg_marker_delay()}) return sweep_data
def pulse_gates(self, gates, sweep_range, period, do_upload=True): sequences = dict() sequences.update(self.__make_markers(period)) for gate_name, rel_amplitude in gates.items(): amplitude = rel_amplitude * sweep_range sequences[gate_name] = Sequencer.make_square_wave( amplitude, period) sweep_data = self.sequence_gates(sequences, do_upload) return sweep_data.update({ 'sweeprange': sweep_range, 'period': period, 'markerdelay': self.digitizer_marker_delay() })
def pulse_gates_2d(self, gates, sweep_ranges, period, resolution, do_upload=True): sequences = dict() sequences.update(self.__make_markers(period)) period_x = resolution[0] * period for gate_name_x, rel_amplitude_x in gates[0].items(): amplitude_x = rel_amplitude_x * sweep_ranges[0] sequences[gate_name_x] = Sequencer.make_square_wave( amplitude_x, period_x) period_y = resolution[0] * resolution[1] * period for gate_name_y, rel_amplitude_y in gates[1].items(): amplitude_y = rel_amplitude_y * sweep_ranges[1] sequences[gate_name_y] = Sequencer.make_square_wave( amplitude_y, period_y) sweep_data = self.sequence_gates(sequences, do_upload) return sweep_data.update({ 'sweeprange_horz': sweep_ranges[0], 'sweeprange_vert': sweep_ranges[1], 'resolution': resolution, 'period': period_x, 'period_vert': period_y, 'samplerate': self.awgs[0].retrieve_setting('channel_sampling_rate'), 'markerdelay': self.awg_marker_delay() })