Пример #1
0
 private void ReplotChartAndHistogram()
 {
     ChartWrapper.SetSignal(SignalSlot, Signal);
     ChartWrapper.Replot();
     HistogramWrapper.SetSignal(SignalSlot, Signal);
     HistogramWrapper.Replot();
 }
Пример #2
0
        private void DB6(object sender, RoutedEventArgs e)
        {
            var waveletTransformationOutput = WaveletTransform.WaveletTransformation(Signal);
            var output = new List <Value>();

            for (int i = 0; i < waveletTransformationOutput.Count(); i++)
            {
                var value = new Value
                {
                    X = new Complex(i, 0),
                    Y = new Complex(waveletTransformationOutput[i].Real, 0)
                };
                output.Add(value);
            }
            Signal = DiscreteSignal.ForParameters("DB6", CPS.Signal.SignalType.CONTINUOUS, 1, output);
            ChartWrapper.SetSignal(SignalSlot, Signal);
            ChartWrapper.Replot();
        }
Пример #3
0
        private void FFTTransform(Func <List <Complex>, List <Complex> > transformFunc)
        {
            var input     = Signal.Values.Select(value => value.Y).ToList();
            var fftOutput = transformFunc(input);
            var output    = new List <Value>();

            for (int i = 0; i < fftOutput.Count(); i++)
            {
                var value = new Value
                {
                    X = new Complex(i, 0),
                    Y = fftOutput[i]
                };
                output.Add(value);
            }
            Signal = DiscreteSignal.ForParameters("fft", CPS.Signal.SignalType.CONTINUOUS, 1, output);
            ChartWrapper.SetSignal(SignalSlot, Signal);
            ChartWrapper.Replot();
        }
Пример #4
0
 private void DB6reverse(object sender, RoutedEventArgs e)
 {
     Signal = WaveletTransform.WaveletBackwardTransformation(Signal);
     ChartWrapper.SetSignal(SignalSlot, Signal);
     ChartWrapper.Replot();
 }
Пример #5
0
 private void ComputeHammingWindow(object sender, RoutedEventArgs e)
 {
     Signal = new  HammingWindow(Signal, M);
     ChartWrapper.SetSignal(SignalSlot, Signal);
     ReplotChartAndHistogram();
 }
Пример #6
0
 private void GenerateImpulseResponseBandpass(object sender, RoutedEventArgs e)
 {
     Signal = new BandPassImpulseResponse(K, M);
     ChartWrapper.SetSignal(SignalSlot, Signal);
     ReplotChartAndHistogram();
 }