/// <summary> /// Computes FFT for the given sampleset. /// </summary> /// <param name="Samples">Sampleset on which to compute a FFT</param> public FFT(List <double> Samples, List <BandFrequencyDefinition> CustomBands = null) { using (ILScope.Enter()) { ILInArray <double> inArr = Samples.ToArray(); ILRetArray <complex> output = ILMath.fft(inArr); rawFFTOutput = output.ToArray(); } ComputeFrequencyPowerSamples(); //FrequencyBands ComputeAbsoluteBandPower(BandFrequencyDefinition.Delta); ComputeAbsoluteBandPower(BandFrequencyDefinition.Theta); ComputeAbsoluteBandPower(BandFrequencyDefinition.Alpha); ComputeAbsoluteBandPower(BandFrequencyDefinition.Beta); ComputeAbsoluteBandPower(BandFrequencyDefinition.Gamma); if (CustomBands != null) { foreach (BandFrequencyDefinition customBand in CustomBands) { ComputeAbsoluteBandPower(customBand); } } }