Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
#all imports
import pvaccess
import time
from datetime import datetime
import numpy as np
import epics
from epics import caget ,cainfo ,caput ,camonitor
import matplotlib.pyplot as plt
import os
import PIL
from PIL import Image
import glob
import cv2
#get value for recording
a = caget("CRYVISIL:META:Save_Video")
number = 0
img_array = []
os.makedirs('Stm_Video_Pictures')
#loop
while a == 1:
channel = pvaccess.Channel("live_display")
dict = channel.get("field(image)")
arr = dict["image"]
x = caget("CRYVISIL:META:LiveDisplay:Binsize")
img = arr.reshape(x,x)
y = plt.imshow(img, cmap='viridis')
number += 1
plt.savefig('./Stm_Video_Pictures/Stm_image%d.jpg' %number)
time.sleep(0.03)