recording epics cam images

This commit is contained in:
2017-11-18 16:34:07 +01:00
parent 6ea607bad6
commit 3a7a47d382
+8
View File
@@ -8,6 +8,7 @@ from cam_server.utils import get_host_port_from_stream_address
from bsread import source, SUB
import subprocess
import h5py
from time import sleep
@@ -38,6 +39,13 @@ class CameraCA:
i = caget(self.Id+':FPICTURE', count=numpix)
return i.reshape(h,w)
def record_images(self,fina,N_images,sleeptime=0.2):
with h5py.File(fina,'w') as f:
d = []
for n in range(N_images):
d.append(self.get_data())
sleep(sleeptime)
f['images'] = np.asarray(d)
def gui(self, guiType='xdm'):
""" Adjustable convention"""