Exemplo n.º 1
0
 public DiscretizationParameters(CutoffFrequenciesEnum cutoff, FrequencyResolutionsEnum resolution)
 {
     _cutoffFrequency = CutoffFrequencies.GetCutoffFrequency(cutoff);
     _frequencyResolution = FrequencyResolutions.GetFrequencyResolution(resolution);
     _sampleRate = SampleRates.GetSampleRate(cutoff);
     _pointsNumber = (int)(_sampleRate / _frequencyResolution);
 }
Exemplo n.º 2
0
 public static int GetSampleRate(CutoffFrequenciesEnum cutoff)
 {
     switch (cutoff)
     {
         case CutoffFrequenciesEnum.f1k:
             return Fs3K;
         case CutoffFrequenciesEnum.f2_5k:
             return Fs7K;
         case CutoffFrequenciesEnum.f5k:
             return Fs15K;
         case CutoffFrequenciesEnum.f10k:
             return Fs30K;
         case CutoffFrequenciesEnum.f20k:
             return Fs60K;
         case CutoffFrequenciesEnum.f30k:
             return Fs90K;
         case CutoffFrequenciesEnum.f40k:
             return Fs120K;
         case CutoffFrequenciesEnum.f50k:
             return Fs150K;
         case CutoffFrequenciesEnum.f60k:
             return Fs180K;
         case CutoffFrequenciesEnum.f70k:
             return Fs210K;
         case CutoffFrequenciesEnum.f80k:
             return Fs240K;
         case CutoffFrequenciesEnum.f90k:
             return Fs270K;
         case CutoffFrequenciesEnum.f100k:
             return Fs300K;
         case CutoffFrequenciesEnum.f110k:
             return Fs330K;
         case CutoffFrequenciesEnum.f120k:
             return Fs360K;
         case CutoffFrequenciesEnum.f130k:
             return Fs390K;
         case CutoffFrequenciesEnum.f140k:
             return Fs420K;
         case CutoffFrequenciesEnum.f150k:
             return Fs450K;
         default:
             throw new ArgumentException();
     }
 }
Exemplo n.º 3
0
 public static int GetCutoffFrequency(CutoffFrequenciesEnum cutoff)
 {
     switch (cutoff)
     {
         case CutoffFrequenciesEnum.f1k:
             return F1K;
         case CutoffFrequenciesEnum.f2_5k:
             return F2_5K;
         case CutoffFrequenciesEnum.f5k:
             return F5K;
         case CutoffFrequenciesEnum.f10k:
             return F10K;
         case CutoffFrequenciesEnum.f20k:
             return F20K;
         case CutoffFrequenciesEnum.f30k:
             return F30K;
         case CutoffFrequenciesEnum.f40k:
             return F40K;
         case CutoffFrequenciesEnum.f50k:
             return F50K;
         case CutoffFrequenciesEnum.f60k:
             return F60K;
         case CutoffFrequenciesEnum.f70k:
             return F70K;
         case CutoffFrequenciesEnum.f80k:
             return F80K;
         case CutoffFrequenciesEnum.f90k:
             return F90K;
         case CutoffFrequenciesEnum.f100k:
             return F100K;
         case CutoffFrequenciesEnum.f110k:
             return F110K;
         case CutoffFrequenciesEnum.f120k:
             return F120K;
         case CutoffFrequenciesEnum.f130k:
             return F130K;
         case CutoffFrequenciesEnum.f140k:
             return F140K;
         case CutoffFrequenciesEnum.f150k:
             return F150K;
         default:
             throw new ArgumentException();
     }
 }