Example #1
0
        /// <summary>
        /// Вычисляет коэффициэнты таблицы калибровки
        /// </summary>
        public void CalculateKoef()
        {
            if (parameters.Count >= 2)
            {
                koefs.Clear();
                for (int index = 0; index < parameters.Count - 1; index++)
                {
                    double param  = parameters[index].Calibrated;
                    double param1 = parameters[index + 1].Calibrated;

                    double sig  = parameters[index].Physical;
                    double sig1 = parameters[index + 1].Physical;

                    double a = (param1 - param) / (sig1 - sig);


                    double paramB  = parameters[index + 1].Calibrated;
                    double paramB1 = parameters[index + 1].Physical;

                    double b = paramB - (paramB1 * a);

                    CalibrationKoefs k = new CalibrationKoefs(a, b);
                    koefs.Add(k);
                }
            }
        }
Example #2
0
        /// <summary>
        /// Вычисляет коэффициэнты таблицы калибровки
        /// </summary>
        public void CalculateKoef()
        {
            if (parameters.Count >= 2)
            {
                koefs.Clear();
                for (int index = 0; index < parameters.Count - 1; index++)
                {
                    double param = parameters[index].Calibrated;
                    double param1 = parameters[index + 1].Calibrated;

                    double sig = parameters[index].Physical;
                    double sig1 = parameters[index + 1].Physical;

                    double a = (param1 - param) / (sig1 - sig);

                    double paramB = parameters[index + 1].Calibrated;
                    double paramB1 = parameters[index + 1].Physical;

                    double b = paramB - (paramB1 * a);

                    CalibrationKoefs k = new CalibrationKoefs(a, b);
                    koefs.Add(k);
                }
            }
        }