public static double GetFrequencyResolution(FrequencyResolutionsEnum resolution) { switch (resolution) { case FrequencyResolutionsEnum.fs0_125: return FR0_125; case FrequencyResolutionsEnum.fs0_25: return FR0_25; case FrequencyResolutionsEnum.fs0_5: return FR0_5; case FrequencyResolutionsEnum.fs2: return FR2; case FrequencyResolutionsEnum.fs4: return FR4; case FrequencyResolutionsEnum.fs8: return FR8; case FrequencyResolutionsEnum.fs16: return FR16; case FrequencyResolutionsEnum.fs32: return FR32; case FrequencyResolutionsEnum.fs64: return FR64; case FrequencyResolutionsEnum.fs128: return FR128; case FrequencyResolutionsEnum.fs256: return FR256; case FrequencyResolutionsEnum.fs1: default: return FR1; } }
public DiscretizationParameters(CutoffFrequenciesEnum cutoff, FrequencyResolutionsEnum resolution) { _cutoffFrequency = CutoffFrequencies.GetCutoffFrequency(cutoff); _frequencyResolution = FrequencyResolutions.GetFrequencyResolution(resolution); _sampleRate = SampleRates.GetSampleRate(cutoff); _pointsNumber = (int)(_sampleRate / _frequencyResolution); }