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_specest(self):
     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),
             '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.sinusoids_count, options.correlation_size, options.samples, options.fft_len, 1),
             'music': lambda: specest.music(options.sinusoids_count, 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]()
Ejemplo n.º 3
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.º 4
0
 def setup_block(self, shift_fft):
     # FIXME 2x fft_size?
     self.block = specest.esprit(self.sin_cnt, self.cor_size,
                                 self.fft_size, self.fft_size, 1)
     return (self.fft_size, self.fft_size)