Beispiel #1
0
 public Filter(int size)
 {
     this.filter_real     = new float[size];
     this.filter_imag     = new float[size];
     this.i_overlap       = new float[size / 2];
     this.q_overlap       = new float[size / 2];
     this.size            = size;
     this.fft             = new FFT(size);
     this.filter_designer = new FilterDesigner();
 }
Beispiel #2
0
        public PowerSpectrum(int fft_size, WindowType wt)
        {
            this.fft_size     = fft_size;
            this.results_size = fft_size;
            this.window       = new double[fft_size / 2];
            this.ps_results   = new double[fft_size]; //don't overrun results buffer
            this.fft          = new FFT(fft_size);
            this.filt_design  = new FilterDesigner();

            filt_design.makewindow(wt, fft_size / 2, ref window);
        }
Beispiel #3
0
 unsafe public PowerSpectrum(int fft_size)
 {
     this.mode          = PowerSpectrumMode.OFF;
     this.position      = PowerSpectrumPosition.PREFILTER;
     this.fft_size      = fft_size;
     this.results_size  = fft_size;
     this.window        = new float[fft_size / 2];
     this.ps_results    = new float[fft_size]; //don't overrun results buffer
     this.scope_results = new float[fft_size];
     this.phase_results = new float[fft_size * 2];
     this.fft           = new FFT(fft_size);
     this.filt_design   = new FilterDesigner();
     fixed(float *ptr_window = &window[0])
     {
         filt_design.makewindow(WindowType.BLACKMANHARRIS_WINDOW, fft_size / 2, ptr_window);
     }
 }