def __init__(self): super(freq_env, self).__init__() self.action_space = [ i for i in np.arange(100000000.0, 110000001.0, 1000000) ] self.n_actions = len(self.action_space) self.n_features = 1601 self.jammer_obj = jammer() self.user_obj = user() self.action_ls = [100000000.0] self.start_freq = 100000000.0 self.end_freq = 110000000.0
def __init__(self): super(freq_env, self).__init__() self.action_space = [ i for i in np.arange(100500000.0, 110000000.0, 500000) ] self.n_actions = len(self.action_space) self.user_obj = user() self.tb = usrp_spetrum_sense.my_top_block() self.tb.start() self.waterfall_bg = self.waterfall_background() self.waterfall_lib = self.waterfall_lib() self.mode = 1
def __init__(self): super(freq_env, self).__init__() self.action_space = np.linspace(100500000, 109500000, 19) self.n_actions = len(self.action_space) self.user_obj = user() self.jammer_obj = jammer() self.tb = usrp_spetrum_sense.my_top_block() self.tb.start() self.waterfall_bg = self.waterfall_background() self.main_thread() self.waterfall_lib = self.waterfall_lib() self.mode = 1
def __init__(self): super(freq_env, self).__init__() self.action_space = [ i for i in np.arange(100000000.0, 110000001.0, 1000000) ] self.n_actions = len(self.action_space) self.n_features = 1601 self.jammer_obj = jammer() self.user_obj = user() self.action_ls = [100000000.0] self.start_freq = 129000000.0 self.end_freq = 130000000.0 self.tb = usrp_spetrum_sense.my_top_block() self.tb.start() self.wf, self.min_index, self.user_f, self.sum_ls = usrp_spetrum_sense.main( self.tb)
def __init__(self, file_name='data_bg_129_130.txt'): super(freq_env, self).__init__() self.action_space = np.linspace(80, 1520, 19, dtype=np.int) self.n_actions = len(self.action_space) self.n_features = 160 self.action_last = 0 self.gen = generator() self.model = self.gen.create_model() self.jamm_pos = 80 self.lines = 100 self.interval = 5 self.tb = usrp_spetrum_sense.my_top_block() self.tb.start() self.user_obj = user() self.jammer_obj = jammer()
def __init__(self): super(freq_env, self).__init__() self.action_space = [ i for i in np.arange(100500000.0, 110000000.0, 500000) ] self.n_actions = len(self.action_space) self.n_features = 1601 self.user_obj = user() self.action_ls = [100000000.0] self.start_freq = 129000000.0 self.end_freq = 130000000.0 self.tb = usrp_spetrum_sense.my_top_block() self.tb.start() self.filename = 'data_100_110.txt' self.start_freq = float(re.findall('\d+', self.filename)[0]) * 1000000.0 self.end_freq = float(re.findall('\d+', self.filename)[1]) * 1000000.0 self.freq_line = [] self.power_ls = [] self.waterfall_bg = self.waterfall_bg() self.mode = 1