Example #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)
Example #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]()
Example #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)
 def setup_block(self, shift_fft):
     self.block = specest.fcov(self.block_len, self.fft_size,
                               self.order, shift_fft, self.decim)
     return (self.block_len, self.fft_size)