Commit e9854f67 authored by Josef Brandt's avatar Josef Brandt

Fixes in advanced WITec Interface

parent 1748c624
......@@ -199,9 +199,10 @@ class WITecCOM(RamanBase):
self.BeamPathSetVideoState = win32com.client.CastTo(self.BeamPathSetVideoStateInterface, 'IBUCSTrigger')
try:
from .advancedWITec import AdvancedWITecSpectra
from .advancedWITec import AdvancedWITecSpectra
except ModuleNotFoundError:
from advancedWITec import AdvancedWITecSpectra
from advancedWITec import AdvancedWITecSpectra
self.advSpec = AdvancedWITecSpectra()
if 'Autofocus' not in [param.name for param in self.ramanParameters]:
self.ramanParameters.append(RamanSettingParam('Autofocus', 'checkBox', default=False))
......@@ -335,21 +336,23 @@ class WITecCOM(RamanBase):
def initiateMeasurement(self, ramanSettings):
assert self.connected
if not self.advancedInterface:
self.initiateTimeSeriesMeasurement(ramanSettings)
else:
if self.advancedInterface:
self.doAutoFocus = ramanSettings["Autofocus"]
if self.advancedInterface and self.doAutoFocus:
self.initateSilentSpectrumAcquisition(ramanSettings)
def triggerMeasurement(self, num):
if not self.advancedInterface:
self.triggerTimeSeriesMeasurement(num)
else:
if self.doAutoFocus:
self.doSpectralAutoFocus()
self.initiateTimeSeriesMeasurement(ramanSettings)
def triggerMeasurement(self, num):
if self.advancedInterface and self.doAutoFocus:
self.doSpectralAutoFocus()
self.acquireSilentSpectrum(num)
else:
self.triggerTimeSeriesMeasurement(num)
def finishMeasurement(self, aborted=False):
if self.advancedInterface:
if self.advancedInterface and self.doAutoFocus:
state = self.BeamPathState.GetValue()
if state == 'Raman':
self.MicroscopeIdle.SetValue('BeamPath|SetStateVideo')
......
......@@ -183,7 +183,7 @@ class AdvancedWITecSpectra(object):
specSize = allSpectra.shape[0]
del allSpectra
numSpectra = spectra.shape[1]
numBatches = np.ceil(numSpectra/self.spectraBatchSize)
numBatches = int(np.ceil(numSpectra/self.spectraBatchSize))
for batchIndex in range(numBatches):
outName = os.path.join(self.dsetpath, f'SpectraForTrueMatch {batchIndex}.txt')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment