public FilterProcessor() { FilterType = FilterType.None; BPFilter = new BandPassFilter(); HPFilter = new HighPassFilter(); LPFilter = new LowPassFilter(); }
public static HighPassFilter Clone(this HighPassFilter filter) { return(new HighPassFilter() { PassbandAttenuationDB = filter.PassbandAttenuationDB, StopbandAttenuationDB = filter.StopbandAttenuationDB, PassbandFre = filter.PassbandFre, StopbandFre = filter.StopbandFre }); }
public static double[] FilterUponRPM(this HighPassFilter filter, double[] input, int samplePoint, double sampleFre, double rpm = 0) { if (filter.PassbandFre * (rpm / 60) > sampleFre / 2.56) { throw new Exception(string.Format("通带频率必须小于等于采样频率的1/2.56({0})", sampleFre / 2.56)); } return(Algorithm.Instance.HighPassFilter(input, samplePoint, sampleFre, filter.PassbandFre * (rpm / 60), filter.StopbandFre * (rpm / 60), filter.PassbandAttenuationDB, filter.StopbandAttenuationDB)); }