Exemplo n.º 1
0
        public SpectrDataView GetCorrectedData(SpectrDataView signal_minus_nul)
        {
            int sn = signal_minus_nul.GetSensorCount();

            float[][] rez = new float[sn][];
            for (int s = 0; s < sn; s++)
            {
                float[] data = signal_minus_nul.GetSensorData(s);
                rez[s] = new float[data.Length];
                for (int i = 0; i < data.Length; i++)
                {
                    if (rez[s][i] != float.MaxValue)
                    {
                        rez[s][i] = GetCorrectedValue(s, i, data, signal_minus_nul.MaxLinarLevel);//data[i] * SensK[s][i];
                    }
                }
                //if(use_gaus)
                //    rez[s] = SpectrFunctions.FoldingGaus(0, rez[s].Length, rez[s],
                //            WFk[s], AFk[s], 1);
            }

            return(new SpectrDataView(signal_minus_nul.GetCondition(), rez,
                                      (short)signal_minus_nul.OverloadLevel,
                                      (short)signal_minus_nul.MaxLinarLevel));
        }
Exemplo n.º 2
0
        public SpectrDataView GetCorrectedData(SpectrDataView signal,
                                               SpectrDataView nul)
        {
            float[][] data      = new float[signal.GetSensorCount()][];
            float     max_level = signal.MaxLinarLevel;

            for (int s = 0; s < data.Length; s++)
            {
                float[] tsig = signal.GetSensorData(s);
                float[] tnul = nul.GetSensorData(s);
                data[s] = new float[signal.GetSensorSize(s)];
                for (int i = 0; i < data[s].Length; i++)
                {
                    data[s][i] = GetCorrectedValue(s, i, tsig, tnul, max_level);
                }
            }
            SpectrDataView s_minus_nul = new SpectrDataView(signal.GetCondition(),
                                                            data, (short)signal.OverloadLevel, (short)signal.MaxLinarLevel);

            return(s_minus_nul);// GetCorrectedData(s_minus_nul, use_gaus);
        }