Exemple #1
0
 public FilterData(FilterTypes _ftype, double Fsample, int order1, double F3db1, int order2, double F3db2)
 {
     _DataSeries = new XyDataSeries <double, double>();
     nLastIndex  = 0;
     _filtertype = _ftype;
     if (_filtertype == FilterTypes.FIRLowPass)
     {
         _firLowPass = new LowpassFilterButterworthImplementation(F3db1, order1, Fsample);
     }
     else if (_filtertype == FilterTypes.FIRLP_MA)
     {
         _firLowPass     = new LowpassFilterButterworthImplementation(F3db1, order1, Fsample);
         _OriginalValues = new List <double>();
     }
     else if (_filtertype == FilterTypes.FIRHighPass)
     {
         _firHighPass = new HighpassFilterButterworthImplementation(F3db1, order1, Fsample);
     }
     else if (_filtertype == FilterTypes.FIRBandPass)
     {
         _firBandPass = new BandpassFilterButterworthImplementation(F3db1, order1, F3db2, order2, Fsample);
     }
     else if (_filtertype == FilterTypes.FIRBP_MA)
     {
         _firBandPass    = new BandpassFilterButterworthImplementation(F3db1, order1, F3db2, order2, Fsample);
         _OriginalValues = new List <double>();
     }
 }
Exemple #2
0
 public BandpassFilterButterworthImplementation
     (double bottomFrequencyHz, int bottomNumSections, double topFrequencyHz, int topNumSections, double Fs)
 {
     this.lowpassFilter = new LowpassFilterButterworthImplementation
                              (topFrequencyHz, topNumSections, Fs);
     this.highpassFilter = new HighpassFilterButterworthImplementation
                               (bottomFrequencyHz, bottomNumSections, Fs);
 }
Exemple #3
0
 public void ResetFilter(FilterTypes _ftype, double Fsample, int order1, double F3db1, int order2 = 0, double F3db2 = 0)
 {
     if (_ftype == FilterTypes.FIRLowPass || _ftype == FilterTypes.FIRLP_MA)
     {
         _firLowPass = new LowpassFilterButterworthImplementation(F3db1, order1, Fsample);
     }
     else if (_ftype == FilterTypes.FIRHighPass)
     {
         _firHighPass = new HighpassFilterButterworthImplementation(F3db1, order1, Fsample);
     }
     else if (_ftype == FilterTypes.FIRBandPass || _ftype == FilterTypes.FIRBP_MA)
     {
         _firBandPass = new BandpassFilterButterworthImplementation(F3db1, order1, F3db2, order2, Fsample);
     }
 }