Esempio n. 1
0
                                     minimum_trigger=0.1)
    pulseblaster_clock = Pseudoclock('pulseblaster_clock',
                                     pulseblaster,
                                     'clock',
                                     clock_minimum_period=1,
                                     wait_delay=0.5,
                                     timebase=0.1)
    clockline = ClockLine('clockline', pulseblaster_clock, 'flag 1')
    ni_card = ClockableDevice('ni_card',
                              clockline,
                              'clock',
                              clock_minimum_trigger=0.1,
                              clock_minimum_period=1.2)
    ao = Output('ao', ni_card, 'ao0')
    shot.start()
    shot.wait(t=7, name='first_wait')
    ao.constant(t=0, value=7)
    ao.function(t=0, duration=7, function=np.sin, samplerate=20)

    shot.stop(1)

    print(time.time() - start_time)

# TODO list:
# If higher level labscript code subclasses or adds extra parent classes to
# Device/Output/Instruction etc, then those classes need to cooperate with
# this - calling super().__init__ methods etc, and we need to add settings
# (class attributes for subclasses to override?) to Shot that allow higher
# level code to replace the core library's base classes for Device etc with
# its own.