Commit eb40b17b authored by Alejandro Homs Puron's avatar Alejandro Homs Puron
Browse files

* Added multi-stream access in [Taco]FrelonCdd/Acq: DevCcdSet/GetExtFilePar

* Allow call to FrelonAcq.setE2VCorrection active (FrelonTacoAcq.setMode)
  during acquisition if not changing the status
parent 7ee4bc2a
......@@ -193,23 +193,26 @@ class FrelonAcq:
def checkE2VCorrection(self):
deb.Trace('Checking E2V correction')
ct_status = self.m_ct.getStatus()
if ct_status.AcquisitionStatus == AcqRunning:
raise Exception, 'Acquisition is running'
chip_type = self.m_cam.getModel().getChipType()
is_e2v = (chip_type == Frelon.E2V_2k)
corr_act = (is_e2v and self.m_e2v_corr_act)
deb.Param('is_e2v=%s, self.m_e2v_corr_act=%s' % (is_e2v,
if corr_act and not self.m_e2v_corr:
if bool(corr_act) == bool(self.m_e2v_corr):
ct_status = self.m_ct.getStatus()
if ct_status.AcquisitionStatus == AcqRunning:
raise Exception, 'Acquisition is running'
if corr_act:
deb.Trace('Enabling E2V correction')
self.m_e2v_corr = Frelon.E2VCorrection()
self.m_e2v_corr_update = self.E2VCorrectionUpdate(self.m_e2v_corr,
elif not corr_act and self.m_e2v_corr:
deb.Trace('Disabling E2V correction')
......@@ -474,14 +477,25 @@ class FrelonAcq:
return spb2_config
def setFilePar(self, file_par):
deb.Param('Setting file par: %s' % file_par)
def setFileStreamAct(self, act, stream_idx):
deb.Param('Setting file stream %d act: %s' % (stream_idx, act))
self.m_ct_saving.setStreamActive(stream_idx, act)
def getFileStreamAct(self, stream_idx):
act = self.m_ct_saving.getStreamActive(stream_idx)
deb.Return('Getting file stream %d act: %s' % (stream_idx, act))
return act
def setFileStreamPar(self, file_par, stream_idx=0):
deb.Param('Setting file stream %d par: %s' % (stream_idx, file_par))
self.m_ct_saving.setParameters(file_par, stream_idx)
def getFilePar(self):
file_par = self.m_ct_saving.getParameters()
deb.Return('Getting file par: %s' % file_par)
def getFileStreamPar(self, stream_idx=0):
file_par = self.m_ct_saving.getParameters(stream_idx)
deb.Return('Getting file stream %d par: %s' % (stream_idx, file_par))
return file_par
Supports Markdown
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