Ejemplo n.º 1
0
 def _setup_specest(self):
     """Select the chosen estimator and configure it, add it into the flow
     graph.
     """
     options = self.options
     specest_selector = {
         'welch': lambda: specest.welch(options.fft_len, options.overlap,
                                        options.ma_length, options.shift_fft,
                                        options.window_type, options.window_param),
         'welchsp': lambda: specest.welchsp(options.fft_len, options.overlap,
                                            options.alpha, options.shift_fft,
                                            options.window_type, options.window_param),
         'burg': lambda: specest.burg(options.samples, options.fft_len,
                                      options.order, options.shift_fft),
         'fcov': lambda: specest.fcov(options.samples, options.fft_len,
                                      options.order, options.shift_fft),
         'fmcov': lambda: specest.fmcov(options.samples, options.fft_len,
                                        options.order, options.shift_fft),
         'esprit': lambda: specest.esprit(options.order, options.correlation_size,
                                          options.samples, options.fft_len, 1),
         'music': lambda: specest.music(options.order, options.correlation_size,
                                        options.samples, options.fft_len, 1),
         'mtm': lambda: specest.mtm(options.fft_len, options.timebandwidthproduct,
                                    options.n_tapers, options.weight_method,
                                    options.shift_fft)}
     self.specest = specest_selector[options.method]()
     if self.options.verbose:
         verbose_output_estimator(options)
Ejemplo n.º 2
0
 def setup_block(self, shift_fft):
     try:
         window = WIN_TYPE_IDX[self.window]
     except KeyError:
         print "Unknown window-type set for Welch!"
     self.block = specest.welchsp(self.fft_size, self.overlap, self.alpha,
                                  shift_fft, window, self.window_option)
     return (self.fft_size, self.fft_size)
Ejemplo n.º 3
0
 def setup_block(self, shift_fft):
     try:
         window = WIN_TYPE_IDX[self.window]
     except KeyError:
         print "Unknown window-type set for Welch!"
     self.block = specest.welchsp(self.fft_size, self.overlap,
                                self.alpha, shift_fft,
                                window, self.window_option)
     return (self.fft_size, self.fft_size)
Ejemplo n.º 4
0
 def _setup_specest(self):
     """Select the chosen estimator and configure it, add it into the flow
     graph.
     """
     options = self.options
     specest_selector = {
         'welch':
         lambda: specest.
         welch(options.fft_len, options.overlap, options.ma_length, options.
               shift_fft, options.window_type, options.window_param),
         'welchsp':
         lambda: specest.welchsp(options.fft_len, options.overlap, options.
                                 alpha, options.shift_fft, options.
                                 window_type, options.window_param),
         'burg':
         lambda: specest.burg(options.samples, options.fft_len, options.
                              order, options.shift_fft),
         'fcov':
         lambda: specest.fcov(options.samples, options.fft_len, options.
                              order, options.shift_fft),
         'fmcov':
         lambda: specest.fmcov(options.samples, options.fft_len, options.
                               order, options.shift_fft),
         'esprit':
         lambda: specest.esprit(options.order, options.correlation_size,
                                options.samples, options.fft_len, 1),
         'music':
         lambda: specest.music(options.order, options.correlation_size,
                               options.samples, options.fft_len, 1),
         'mtm':
         lambda: specest.mtm(options.fft_len, options.timebandwidthproduct,
                             options.n_tapers, options.weight_method,
                             options.shift_fft)
     }
     self.specest = specest_selector[options.method]()
     if self.options.verbose:
         verbose_output_estimator(options)