Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions py4syn/epics/AreaDetector.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def __init__(self, mnemonic, pv,device, fileplugin,
self.detector.add_callback("Acquire_RBV",
callback=self.onAcquireChange)
self.setImageMode(0)

self.detector.TriggerMode = 1
self.detector.Scan = 9
self.detector.ImageMode = self.getImageMode()
self.detector.AcquirePeriod = 0
Expand Down Expand Up @@ -101,7 +101,7 @@ def __init__(self, mnemonic, pv,device, fileplugin,
self.stopCapture()

if self.trigger == 'External':
self.setTriggerMode(3)
self.setTriggerMode(4)
else:
self.setTriggerMode(1)
self.detector.ImageMode = self.getImageMode()
Expand Down Expand Up @@ -378,6 +378,7 @@ def setCountTime(self, t):
Acquisition time
"""
self.detector.AcquireTime = t

self.detector.AcquirePeriod = 0

def getAcquireTime(self):
Expand All @@ -397,6 +398,7 @@ def startCount(self):
"""
if not self._done:
raise RuntimeError('Already counting')
self.detector.AcquirePeriod = 0
self.detector.Acquire = 1
self._done = 0 # force the confirmation that the detector has already received acquire function

Expand Down
5 changes: 3 additions & 2 deletions py4syn/utils/scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -1206,7 +1206,8 @@ def __terminate(self):
x = SCAN_DATA[XFIELD]
y = SCAN_DATA[YFIELD]
if(FIT_SCAN):
fitData(x, y)
if type(y[0]) is not numpy.ndarray:
fitData(x, y)
if(PRINT_SCAN):
print("Peak = ", PEAK, " at ", PEAK_AT)
print("Fwhm = ", FWHM, " at ", FWHM_AT)
Expand Down Expand Up @@ -1484,7 +1485,7 @@ def doTime(self):

def doFly(self):
global FIT_SCAN

FIT_SCAN = False
positions = []
indexes = []

Expand Down