DAQ: functionality for auto_exposure added using enums
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
from enum import Enum
|
||||
|
||||
import epics
|
||||
import numpy as np
|
||||
|
||||
class AutoEnum(Enum):
|
||||
MANUAL = 0
|
||||
ONCE = 1
|
||||
AUTO = 2
|
||||
|
||||
class epicsAD(object):
|
||||
def __init__(self, prefix, cam="cam1:", image="image1:"):
|
||||
@@ -133,10 +139,10 @@ class epicsAD(object):
|
||||
self.expo.put(expo) # 20 hz acquisition
|
||||
self.acquire.put(1)
|
||||
|
||||
def set_auto(self):
|
||||
def set_auto(self, state: AutoEnum):
|
||||
self.acquire.put(0, wait=True)
|
||||
self.gain_mode.put(2) # automatic gain control
|
||||
self.expo_mode.put(2) # automatic exposure control
|
||||
self.gain_mode.put(state.value) # automatic gain control
|
||||
self.expo_mode.put(state.value) # automatic exposure control
|
||||
self.acquire.put(1)
|
||||
|
||||
def set_auto_once(self):
|
||||
|
||||
Reference in New Issue
Block a user