def setUp(self): AWGTestHelper.__init__(self, APS2Pattern) for name in ['APS1', 'APS2', 'APS3', 'APS4', 'APS5', 'APS6']: channelName = name + '-1' channel = PhysicalQuadratureChannel(label=channelName, channel=0) channel.sampling_rate = 1.2e9 channel.instrument = name channel.translator = 'APS2Pattern' self.channels[channelName] = channel for m in range(1, 5): channelName = "{0}-m{1}".format(name, m) channel = PhysicalMarkerChannel(label=channelName, channel=m-1) channel.sampling_rate = 1.2e9 channel.instrument = name channel.translator = 'APS2Pattern' self.channels[channelName] = channel mapping = {'digitizerTrig': 'APS1-m1', 'slave_trig': 'APS1-m2', 'q1': 'APS1-1', 'q1-gate': 'APS1-m3', 'M-q1': 'APS2-1', 'M-q1-gate': 'APS2-m1', 'q2': 'APS3-1', 'q2-gate': 'APS3-m1', 'M-q2': 'APS4-1', 'M-q2-gate': 'APS4-m1', 'cr': 'APS5-1', 'cr-gate': 'APS5-m1', 'M-q1q2': 'APS6-1', 'M-q1q2-gate': 'APS6-m1'} self.finalize_map(mapping)
def assign_to_hw(channels): """Assign the channels to physical channels, returning modified channels. Use APS1-10. (1 for q1, digitizer, slave; 2 for M-q1, 3=q2, 4=M-q2, 5=cr,....""" from QGL.Channels import PhysicalQuadratureChannel, PhysicalMarkerChannel for name in [ 'APS1', 'APS2', 'APS3', 'APS4', 'APS5', 'APS6', 'APS7', 'APS8', 'APS9', 'APS10' ]: channelName = name + '-1' channel = PhysicalQuadratureChannel(label=channelName, channel=0) channel.sampling_rate = 1.2e9 channel.instrument = name channel.translator = 'APS2Pattern' channels[channelName] = channel for m in range(1, 5): channelName = "{0}-m{1}".format(name, m) channel = PhysicalMarkerChannel(label=channelName, channel=m - 1) channel.sampling_rate = 1.2e9 channel.instrument = name channel.translator = 'APS2Pattern' channels[channelName] = channel # FIXME: Needs a sequence_file and channel somehow? mapping = { 'digitizerTrig': 'APS1-m1', 'slave_trig': 'APS1-m2', 'q1': 'APS1-1', 'q1-gate': 'APS1-m3', 'M-q1': 'APS2-1', 'M-q1-gate': 'APS2-m1', 'q2': 'APS3-1', 'q2-gate': 'APS3-m1', 'M-q2': 'APS4-1', 'M-q2-gate': 'APS4-m1', 'cr': 'APS5-1', 'cr-gate': 'APS5-m1', 'M-q1q2': 'APS6-1', 'M-q1q2-gate': 'APS6-m1', 'q3': 'APS7-1', 'q3-gate': 'APS7-m1', 'M-q3': 'APS8-1', 'M-q3-gate': 'APS8-m1', 'cr2': 'APS9-1', 'cr2-gate': 'APS9-m1', 'M-q2q1': 'APS10-1', 'M-q2q1-gate': 'APS10-m1' } for name, value in mapping.items(): channels[name].phys_chan = channels[value] return channels
def setUp(self): AWGTestHelper.__init__(self, APSPattern) for name in ['APS1', 'APS2', 'APS3']: for ch in ['12', '34']: channelName = name + '-' + ch channel = PhysicalQuadratureChannel(label=channelName) channel.sampling_rate = 1.2e9 channel.instrument = name channel.translator = 'APSPattern' self.channels[channelName] = channel for m in range(1, 5): channelName = "{0}-{1}m1".format(name, m) channel = PhysicalMarkerChannel(label=channelName) channel.sampling_rate = 1.2e9 channel.instrument = name channel.translator = 'APSPattern' self.channels[channelName] = channel mapping = { 'digitizerTrig': 'APS1-1m1', 'slave_trig': 'APS1-2m1', 'q1': 'APS1-12', 'M-q1': 'APS1-34', 'M-q1-gate': 'APS1-3m1', 'q1-gate': 'APS1-4m1', 'q2': 'APS2-12', 'M-q2': 'APS2-34', 'M-q2-gate': 'APS2-1m1', 'q2-gate': 'APS2-2m1', 'cr': 'APS3-12', 'cr-gate': 'APS3-1m1', 'M-q1q2': 'APS3-34', 'M-q1q2-gate': 'APS3-2m1' } # override trigger lengths on APS1 to get single blips self.channels['slave_trig'].pulse_params['length'] = 0.833e-9 self.channels['digitizerTrig'].pulse_params['length'] = 0.833e-9 self.finalize_map(mapping)
def setUp(self): AWGTestHelper.__init__(self, TekPattern) for name in ['TEK1', 'TEK2']: for ch in ['12', '34']: channelName = name + '-' + ch channel = PhysicalQuadratureChannel(label=channelName) channel.sampling_rate = 1.2e9 channel.instrument = name channel.translator = 'TekPattern' self.channels[channelName] = channel for m in ['1m1', '1m2', '2m1', '2m2', '3m1', '3m2', '4m1', '4m2']: channelName = "{0}-{1}".format(name, m) channel = PhysicalMarkerChannel(label=channelName) channel.sampling_rate = 1.2e9 channel.instrument = name channel.translator = 'TekPattern' self.channels[channelName] = channel mapping = { 'digitizerTrig': 'TEK1-1m2', 'slave_trig': 'TEK1-2m2', 'q1': 'TEK1-12', 'M-q1': 'TEK1-12', 'M-q1-gate': 'TEK1-1m1', 'q1-gate': 'TEK1-2m1', 'q2': 'TEK1-34', 'M-q2': 'TEK1-34', 'M-q2-gate': 'TEK1-3m1', 'q2-gate': 'TEK1-4m1', 'cr': 'TEK2-12', 'cr-gate': 'TEK2-1m1', 'M-q1q2': 'TEK2-34', 'M-q1q2-gate': 'TEK2-2m1' } self.finalize_map(mapping)