Exemplo n.º 1
0
    def config_reload(self):
        config_reload()
        #config
        self.center_frequency = config_get("capture.center_frequency", int)
        self.capture_samp_rate = config_get("capture.samp_rate", int)
        self.capture_gain = config_get("capture.gain", int)

        self.offline = False
        self.dump = False

        #trigger
        self.trigger_frequency = config_get("capture.trigger_frequency", int)
        self.trigger_delay = config_get("capture.delay", float)
        self.trigger_execution_time = config_get("capture.execution_time",
                                                 float)

        #demod
        self.demod_select = config_get("capture.demod", int)
        self.demod_frequency = config_get("capture.demod_frequency", int)
        self.demod_lowpass = config_get("capture.demod_lowpass", int)
        self.demod_bandpass_low = config_get("capture.demod_bandpass_low", int)
        self.demod_bandpass_high = config_get("capture.demod_bandpass_high",
                                              int)

        #stft
        self.stft = config_get("preprocess.stft", bool)
        self.stft_log = config_get("preprocess.stft_log", bool)
        self.fft_len = config_get("preprocess.fft_len", int)
        self.fft_step = config_get("preprocess.fft_step", int)
Exemplo n.º 2
0
    def config_save(self):
        config_reload()
        #config
        config_set("capture.center_frequency", self.center_frequency, int)
        config_set("capture.samp_rate", self.capture_samp_rate, int)
        config_set("capture.gain", self.capture_gain, int)

        self.offline = False
        self.dump = False

        #trigger
        config_set("capture.trigger_frequency", self.trigger_frequency, int)
        config_set("capture.delay", self.trigger_delay, float)
        config_set("capture.execution_time", self.trigger_execution_time,
                   float)

        #demod
        config_set("capture.demod", self.demod_select, int)
        config_set("capture.demod_frequency", self.demod_frequency, int)
        config_set("capture.demod_samp_rate", self.demod_samp_rate, int)
        config_set("capture.demod_lowpass", self.demod_lowpass, int)
        config_set("capture.demod_bandpass_low", self.demod_bandpass_low, int)
        config_set("capture.demod_bandpass_high", self.demod_bandpass_high,
                   int)

        #stft
        config_set("preprocess.stft", self.stft, bool)
        config_set("preprocess.stft_log", self.stft_log, bool)
        config_set("preprocess.fft_len", self.fft_len, int)
        config_set("preprocess.fft_step", self.fft_step, int)
Exemplo n.º 3
0
 def apply_config(self):
     global VALUES
     config_reload()
     self.cmd = config_get("misc.cmd", str)
     self.ip = config_get("misc.ip", str)
     self.port = config_get("misc.port", int)
     self.values = VALUES[self.cmd]
Exemplo n.º 4
0
    def config_reload(self):
        config_reload()
        #config
        self.capture_frequency = config_get("capture.frequency", int)
        self.capture_samp_rate = config_get("capture.samp_rate", int)
        self.capture_gain = config_get("capture.gain", int)
        
        self.offline = False
        self.dump = False

        #trigger
        self.trigger_low_pass = config_get("trigger.low_pass", int)
        self.trigger_frequency = config_get("trigger.frequency", int)
        self.trigger_delay = config_get("trigger.delay", float)
        self.trigger_pre = config_get("trigger.pre", float)
        self.trigger_post = config_get("trigger.post", float)

        #demod
        self.demod_select = config_get("demod.select", list)
        self.demod_frequency = config_get("demod.frequency", int)
        self.demod_bandpass_low = config_get("demod.bandpass_low", int)
        self.demod_bandpass_high = config_get("demod.bandpass_high", int)
        self.demod_decimation = config_get("demod.decimation", int)

        #stft
        self.stft = config_get("preprocess.stft", bool)
        self.stft_log = config_get("preprocess.stft_log", bool)
        self.fft_len =  config_get("preprocess.fft_len", int)
        self.fft_step =  config_get("preprocess.fft_step", int)

        self.samp_rate = self.capture_samp_rate / self.demod_decimation
        self.demod_bandpass_high = min(self.samp_rate / 2,  self.demod_bandpass_high)

        if self.demod_select[0] == 0:
            self.demod_decimation = 1
            self.frequency = self.capture_frequency
        elif self.demod_select[0] == 1:
            self.demod_decimation = 1
            self.frequency = self.trigger_frequency
        elif self.demod_select[0] == 2:
            self.frequency = self.trigger_frequency
        elif self.demod_select[0] == 3:
            self.frequency = 0
Exemplo n.º 5
0
 def apply_config(self):
     config_reload()
     self.port = config_get("misc.port", int)
Exemplo n.º 6
0
 def apply_config(self):
     config_reload()
     self.cmd = config_get("misc.cmd", str)
     self.ip = config_get("misc.ip", str)
     self.port = config_get("misc.port", int)
     self.test_value = n2hex(2**2048 - 1)
Exemplo n.º 7
0
 def apply_config(self):
     config_reload()
     self.port = config_get("misc.port", int)