Пример #1
0
 public static List<double> FFTTransform(List<double> serie)
 {
     //Declaring the blocks
     var inputSeriesBlock = new InputSeriesBlock();
     inputSeriesBlock.SetSeries(serie);
     var outputSeriesBlock = new OutputSeriesBlock();
     var fFTBlock = new FFTBlock
     {
         Mode = ManagedFFTModeEnum.UseLookupTable
     };
     //Connecting the blocks
     inputSeriesBlock.OutputNodes[0].ConnectTo(fFTBlock.InputNodes[0]);
     fFTBlock.OutputNodes[1].ConnectTo(outputSeriesBlock.InputNodes[0]);
     //Appending the blocks to a block list and execute all
     var blockList = new BlockList();
     blockList.Add(inputSeriesBlock);
     blockList.Add(fFTBlock);
     blockList.Add(outputSeriesBlock);
     blockList.ExecuteAll();
     return outputSeriesBlock.GetSeries();
 }
Пример #2
0
        private List<double> processOneSeries(List<double> serie)
        {
            //Declaring the blocks
            var inputSeriesBlock = new InputSeriesBlock();
            inputSeriesBlock.SetSeries(serie);
            var dWTBlock = new DWTBlock
            {
                WaveletName = "Daubechies 10 (db10)",
                Level = 1,
                Rescale = false,
                ExtensionMode = WaveletStudio.SignalExtension.ExtensionMode.AntisymmetricWholePoint
            };
            var outputSeriesBlock = new OutputSeriesBlock();

            //Connecting the blocks
            inputSeriesBlock.OutputNodes[0].ConnectTo(dWTBlock.InputNodes[0]);
            dWTBlock.OutputNodes[1].ConnectTo(outputSeriesBlock.InputNodes[0]);

            //Appending the blocks to a block list and execute all
            var blockList = new BlockList();
            blockList.Add(inputSeriesBlock);
            blockList.Add(dWTBlock);
            blockList.Add(outputSeriesBlock);
            blockList.ExecuteAll();
            return outputSeriesBlock.GetSeries();
        }
Пример #3
0
        public static List<double> WaveletTransform(List<double> serie)
        {
            //Declaring the blocks
            var inputSeriesBlock = new InputSeriesBlock();
            inputSeriesBlock.SetSeries(serie);
            var dWTBlock = new DWTBlock
            {
                WaveletName = "coif4",
                Level = 1,
                Rescale = false,
                ExtensionMode = SignalExtension.ExtensionMode.AntisymmetricWholePoint
            };
            var outputSeriesBlock = new OutputSeriesBlock();

            //Connecting the blocks
            inputSeriesBlock.OutputNodes[0].ConnectTo(dWTBlock.InputNodes[0]);
            // dWTBlock.OutputNodes[1].ConnectTo(dWTBlock2.InputNodes[0]);
            dWTBlock.OutputNodes[1].ConnectTo(outputSeriesBlock.InputNodes[0]);

            //Appending the blocks to a block list and execute all
            var blockList = new BlockList();
            blockList.Add(inputSeriesBlock);
            blockList.Add(dWTBlock);
            //blockList.Add(dWTBlock2);
            blockList.Add(outputSeriesBlock);
            blockList.ExecuteAll();
            return outputSeriesBlock.GetSeries();
        }