private void InitPeak(COG peakToInit, double[] Wavelengths, NumericUpDown wLeft, NumericUpDown wRight, NumericUpDown thres)
 {
     peakToInit.SetWaveCof(Wavelengths);
     peakToInit.waveLeft   = (float)wLeft.Value;
     peakToInit.waveRight  = (float)wRight.Value;
     peakToInit.thresholde = (float)thres.Value * (float)0.01;
 }
        private float GetTemperature(float a, float b, float c, COG peakMeasured)
        {
            float temp = a * (peakMeasured.COGinWaveLength - c) + b;

            return(temp);
        }
 private void LabelPlacering(COG peakToLabel, System.Windows.Forms.Label peakLabel, System.Windows.Forms.Label peakLabel2, System.Windows.Forms.Label temp)
 {
     //peakLabel.Text = $"Peak [nm]:  { peakTrace1.GetPeak(peakTrace1.GetLength() - 1)}";
     //peakLabel2.Text = $"Peak [nm]: {peakTrace2.GetPeak(peakTrace2.GetLength() - 1)}";
     temp.Text = $"Temp [°C]: {GetTemperature(a, b, c, peakToLabel)}";
 }
 private void LabelPlacering(COG peakToLabel, System.Windows.Forms.Label peakLabel, System.Windows.Forms.Label peakLabel2, System.Windows.Forms.Label temp)
 {
     peakLabel.Text  = "Peak [nm]: " + peakToLabel.GetCOGinWaveLength();
     peakLabel2.Text = $"Peak [nm]: {peakToLabel.GetCOGinWaveLength()}";
     temp.Text       = $"Temp [°C]: {GetTemperature(a, b, c, peakToLabel)}";
 }