//////////////////////////////////////////////////////////////////////// // Methods //////////////////////////////////////////////////////////////////////// private void updateSpectrometersFromGUI() { if (specIndices == null) { return; } foreach (int specIndex in specIndices) { wrapper.setScansToAverage(specIndex, (int)numericUpDownScansToAverage.Value); wrapper.setBoxcarWidth(specIndex, (int)numericUpDownSmoothingBoxcar.Value); wrapper.setCorrectForElectricalDark(specIndex, checkBoxEnableEDC.Checked ? 1 : 0); wrapper.setCorrectForDetectorNonlinearity(specIndex, checkBoxEnableNLC.Checked ? 1 : 0); wrapper.setStrobeEnable(specIndex, checkBoxStrobeEnable.Checked ? 1 : 0); int integrationTimeMillisec = (int)numericUpDownIntegrationTimeMillisec.Value; if (integrationTimeMillisec <= 0) { integrationTimeMillisec = integrationTimesMillisec[specIndex]; } wrapper.setIntegrationTime(specIndex, integrationTimeMillisec * 1000); } }
public Spectrometer(ref OmniDriver.NETWrapper _wrapper, int _specIndex, int _integrTime, int _average, int _Boxcar) { wrapper = _wrapper; integrTime = _integrTime; average = _average; boxcar = _Boxcar; index = _specIndex; //w microsekundach wrapper.setIntegrationTime(index, integrTime * 1000); wrapper.setScansToAverage(index, average); wrapper.setBoxcarWidth(index, boxcar); }