Exemplo n.º 1
0
        public override SignalImplementation FilterSignal(ISignal signal)
        {
            double samplingFrequency = 1d / (signal.Points[1].Item1 - signal.Points[0].Item1);
            double kCoefficient      = samplingFrequency / _cutoffFrequency;
            SignalImplementation filterCoefficients = getFilterCoefficients(signal, kCoefficient);
            SignalImplementation result             = SignalOperations.ConvoluteSignals(signal, filterCoefficients);

            return(result);
        }
Exemplo n.º 2
0
        public override SignalImplementation FilterSignal(ISignal signal)
        {
            double samplingFrequency = 1d / (signal.Points[1].Item1 - signal.Points[0].Item1);
            double kCoefficient      = samplingFrequency / (samplingFrequency / 2 - _cutoffFrequency);
            SignalImplementation filterCoefficients = getFilterCoefficients(signal, kCoefficient);

            for (int i = 0; i < filterCoefficients.Points.Count; i++)
            {
                filterCoefficients.Points[i].Item2.Real = filterCoefficients.Points[i].Item2.Real * Math.Pow(-1.0, i);
            }
            SignalImplementation result = SignalOperations.ConvoluteSignals(signal, filterCoefficients);

            return(result);
        }