Пример #1
0
        public void SetParamters(int idx, int myStartPixel, int myEndPixel, int myIntegrateTime, int myNumOfAvg, int mySmoothing)
        {
            if (SpecList[idx].specType == SpectType.NoSpectrometer)
            {
                return;
            }

            SpecList[idx].StartPixel      = myStartPixel;
            SpecList[idx].EndPixel        = myEndPixel;
            SpecList[idx].IntegrationTime = myIntegrateTime;
            SpecList[idx].NumOfAvg        = myNumOfAvg;
            SpecList[idx].SmoothingPixel  = mySmoothing;
            switch (SpecList[idx].specType)
            {
            case SpectType.Avantes:
                AvantesObj.SetParamters(SpecList[idx].Idx, SpecList[idx].StartPixel, SpecList[idx].EndPixel,
                                        SpecList[idx].IntegrationTime, SpecList[idx].NumOfAvg, SpecList[idx].SmoothingPixel);
                break;

            case SpectType.Maya:
                MayaObj.SetParamters(SpecList[idx].Idx, SpecList[idx].StartPixel, SpecList[idx].EndPixel,
                                     SpecList[idx].IntegrationTime, SpecList[idx].NumOfAvg, SpecList[idx].SmoothingPixel);
                break;

            case SpectType.CAS140:
                CASObj.SetParamters(SpecList[idx].Idx, SpecList[idx].StartPixel, SpecList[idx].EndPixel,
                                    SpecList[idx].IntegrationTime, SpecList[idx].NumOfAvg, SpecList[idx].SmoothingPixel);
                break;
            }
        }