radio.sensing._component.set_center_freq(1) print "--- Setting ch_status to 1" Logger._ch_status = 1 else: radio.sensing._component.set_center_freq(0) print "--- Setting ch_status to 0" Logger._ch_status = 0 if t_tot == 0: tb.start() time.sleep(t_next) t_tot += t_next if t_tot >= 10.0: break ################################################################################ tfin = time.clock() tb.stop() tb.wait() enable = False Logger.register("global", ["clock"]) Logger.set("global", "clock", tfin - tin) _sdir = "/%s_%02d_%02d/" % (options.sensing, options.ph1 * 10, pfa) _dir = "single/ebn0_{ebn0}".format(ebn0=ebn0) Logger.dump(_dir, _sdir, options.it) Logger.clear_all() with open("log.txt", "a+") as log: log.write(_dir + _sdir)