Beispiel #1
0
 def new_script_repeat(self, c, script_name, repeat, save_data = True):
     if script_name not in self.script_parameters.keys():
         raise Exception ("Script {} Not Found".format(script_name))
     script = self.script_parameters[script_name]
     repeat_launch = scan_methods.repeat_reload(script.cls, repeat, save_data)
     scan_id = self.scheduler.add_scan_to_queue(repeat_launch)
     return scan_id
 def new_script_repeat(self, c, script_name, repeat, save_data=True):
     if script_name not in self.script_parameters.keys():
         raise Exception("Script {} Not Found".format(script_name))
     script = self.script_parameters[script_name]
     repeat_launch = scan_methods.repeat_reload(script.cls, repeat,
                                                save_data)
     scan_id = self.scheduler.add_scan_to_queue(repeat_launch)
     return scan_id
        print 'in initialize', self.name(), ident
        raise Exception ("In a case of a crash, real message would follow")

if __name__ == '__main__':
    #normal way to launch
    cxn = labrad.connect()
    scanner = cxn.scriptscanner
    exprt = fft_spectrum(cxn = cxn)
    ident = scanner.register_external_launch(exprt.name)
    exprt.execute(ident)
    #testing single launch
    cxn = labrad.connect()
    scanner = cxn.scriptscanner
    from scan_methods import single
    exprt = single(fft_spectrum)
    ident = scanner.register_external_launch(exprt.name)
    exprt.execute(ident)
    #testing repeat launch
    cxn = labrad.connect()
    scanner = cxn.scriptscanner
    from scan_methods import repeat_reload
    exprt = repeat_reload(fft_spectrum, 10)
    ident = scanner.register_external_launch(exprt.name)
    exprt.execute(ident)
    #testing scan
    cxn = labrad.connect()
    scanner = cxn.scriptscanner
    from scan_methods import scan_experiment_1D
    exprt = scan_experiment_1D(fft_spectrum, ('TrapFrequencies', 'rf_drive_frequency'), 10.0, 20.0, 10, 'MHZ') 
    ident = scanner.register_external_launch(exprt.name)
    exprt.execute(ident)
Beispiel #4
0
if __name__ == '__main__':
    #normal way to launch
    cxn = labrad.connect()
    scanner = cxn.scriptscanner
    exprt = fft_spectrum(cxn=cxn)
    ident = scanner.register_external_launch(exprt.name)
    exprt.execute(ident)
    #testing single launch
    cxn = labrad.connect()
    scanner = cxn.scriptscanner
    from scan_methods import single
    exprt = single(fft_spectrum)
    ident = scanner.register_external_launch(exprt.name)
    exprt.execute(ident)
    #testing repeat launch
    cxn = labrad.connect()
    scanner = cxn.scriptscanner
    from scan_methods import repeat_reload
    exprt = repeat_reload(fft_spectrum, 10)
    ident = scanner.register_external_launch(exprt.name)
    exprt.execute(ident)
    #testing scan
    cxn = labrad.connect()
    scanner = cxn.scriptscanner
    from scan_methods import scan_experiment_1D
    exprt = scan_experiment_1D(fft_spectrum,
                               ('TrapFrequencies', 'rf_drive_frequency'), 10.0,
                               20.0, 10, 'MHZ')
    ident = scanner.register_external_launch(exprt.name)
    exprt.execute(ident)