Esempio n. 1
0
 def test_generate_large_csv_sequence_program(self):
     expected = textwrap.dedent("""
                     // generated by qcodes.instrument_drivers.ZI.ZIHDAWG8
                     
                     wave wave_1 = "wave_1";
                     wave marker_1 = "marker_1";
                     wave_1 = wave_1 + marker_1;
                     wave marker_2 = "marker_2";
                     wave marker_3 = "marker_3";
                     wave wave_4 = "wave_4";
                     wave wave_5 = "wave_5";
                     wave marker_5 = "marker_5";
                     wave_5 = wave_5 + marker_5;
                     wave wave_6 = "wave_6";
                     wave wave_7 = "wave_7";
                     wave marker_7 = "marker_7";
                     wave_7 = wave_7 + marker_7;
                     wave marker_8 = "marker_8";
                     
                     while(true){
                         playWave(1, wave_1, 2, marker_2, 3, marker_3, 4, wave_4, 5, wave_5, 6, wave_6, 7, wave_7, 8, marker_8);
                     }
                     """)
     sequence_program = ZIHDAWG8.generate_csv_sequence_program([
         (1, "wave_1", "marker_1"), (2, None, "marker_2"),
         (3, None, "marker_3"), (4, "wave_4", None),
         (5, "wave_5", "marker_5"), (6, "wave_6", None),
         (7, "wave_7", "marker_7"), (8, None, "marker_8")
     ])
     self.assertEqual(expected, sequence_program)
Esempio n. 2
0
 def test_generate_csv_sequence_program_1_wave(self):
     expected = textwrap.dedent("""
                     // generated by qcodes.instrument_drivers.ZI.ZIHDAWG8
                     
                     wave wave_1 = "wave_1";
                     
                     while(true){
                         playWave(7, wave_1);
                     }
                     """)
     sequence_program = ZIHDAWG8.generate_csv_sequence_program([
         (7, 'wave_1', None)
     ])
     self.assertEqual(expected, sequence_program)
Esempio n. 3
0
 def test_generate_csv_sequence_program_with_marker_no_waves(self):
     expected = textwrap.dedent("""
                     // generated by qcodes.instrument_drivers.ZI.ZIHDAWG8
                     
                     wave marker_1 = "marker_1";
                     
                     while(true){
                         playWave(6, marker_1);
                     }
                     """)
     sequence_program = ZIHDAWG8.generate_csv_sequence_program([
         (6, None, "marker_1")
     ])
     self.assertEqual(expected, sequence_program)
Esempio n. 4
0
 def test_generate_csv_sequence_program(self):
     expected = textwrap.dedent("""
                     // generated by qcodes.instrument_drivers.ZI.ZIHDAWG8
                     
                     wave wave_1 = "wave_1";
                     wave wave_2 = "wave_2";
                     wave wave_3 = "wave_3";
                     
                     while(true){
                         playWave(1, wave_1, 2, wave_2, 3, wave_3);
                     }
                     """)
     sequence_program = ZIHDAWG8.generate_csv_sequence_program([
         (1, 'wave_1', None), (2, 'wave_2', None), (3, 'wave_3', None)
     ])
     self.assertEqual(expected, sequence_program)
Esempio n. 5
0
 def test_generate_csv_sequence_program_with_2_markers_1_wave(self):
     expected = textwrap.dedent("""
                     // generated by qcodes.instrument_drivers.ZI.ZIHDAWG8
                     
                     wave wave_1 = "wave_1";
                     wave marker_1 = "marker_1";
                     wave_1 = wave_1 + marker_1;
                     wave marker_2 = "marker_2";
                     
                     while(true){
                         playWave(1, wave_1, 2, marker_2);
                     }
                     """)
     sequence_program = ZIHDAWG8.generate_csv_sequence_program([
         (1, "wave_1", "marker_1"), (2, None, "marker_2")
     ])
     self.assertEqual(expected, sequence_program)