Small changes to get the config running

This commit is contained in:
gac-x05la
2024-07-03 15:40:52 +02:00
committed by mohacsi_i
parent 0668e3b7a2
commit 00d1d12b4b
4 changed files with 38 additions and 30 deletions
@@ -47,13 +47,13 @@ femto_mean_curr:
enabled: true
readOnly: true
softwareTrigger: false
es1_roty:
description: 'Test rotation stage'
deviceClass: tomcat_bec.devices.EpicsMotorX
deviceConfig: {prefix: 'X02DA-ES1-SMP1:ROTY'}
onFailure: buffer
enabled: false
readoutPriority: monitored
#es1_roty:
# description: 'Test rotation stage'
# deviceClass: tomcat_bec.devices.EpicsMotorX
# deviceConfig: {prefix: 'X02DA-ES1-SMP1:ROTY'}
# onFailure: buffer
# enabled: false
# readoutPriority: monitored
# es1_tasks:
# description: 'AA1 task management interface'
@@ -79,18 +79,18 @@ es1_roty:
# enabled: true
# readoutPriority: monitored
camera:
description: Grashopper Camera
deviceClass: tomcat_bec.devices.GrashopperTOMCAT
deviceConfig:
prefix: 'X02DA-PG-USB:'
deviceTags:
- camera
enabled: true
onFailure: buffer
readOnly: false
readoutPriority: monitored
softwareTrigger: true
#camera:
# description: Grashopper Camera
# deviceClass: tomcat_bec.devices.GrashopperTOMCAT
# deviceConfig:
# prefix: 'X02DA-PG-USB:'
# deviceTags:
# - camera
# enabled: true
# onFailure: buffer
# readOnly: false
# readoutPriority: monitored
# softwareTrigger: true
gf2:
description: GigaFrost camera controls
@@ -110,7 +110,7 @@ daq:
description: Standard DAQ controls
deviceClass: tomcat_bec.devices.gigafrost.stddaq_ws.StdDaqWsClient
deviceConfig:
url: 'http://xbl-daq-29:8080'
url: 'ws://xbl-daq-29:8080'
deviceTags:
- std-daq
enabled: true
+6 -5
View File
@@ -6,7 +6,8 @@ Created on Thu Jun 27 17:28:43 2024
@author: mohacsi_i
"""
import jsonschema
# Not installed on BEC server
#import jsonschema
MIN_EXPOSURE_MS = 0.002
MAX_EXPOSURE_MS = 40
@@ -228,8 +229,8 @@ layoutSchema = {
def validate_json(json_data):
"""Silently validate a JSON data according to the predefined schema"""
try:
jsonschema.validate(instance=json_data, schema=layoutSchema)
except jsonschema.exceptions.ValidationError:
return False
#try:
# jsonschema.validate(instance=json_data, schema=layoutSchema)
#except jsonschema.exceptions.ValidationError:
# return False
return True
@@ -9,8 +9,15 @@ Created on Thu Jun 27 17:28:43 2024
from ophyd import Device, Component, EpicsSignal, EpicsSignalRO, Kind
from ophyd.device import Staged
import gfconstants as const
from gfutils import extend_header_table
try:
import gfconstants as const
except ModuleNotFoundError:
import tomcat_bec.devices.gigafrost.gfconstants as const
try:
from gfutils import extend_header_table
except ModuleNotFoundError:
from tomcat_bec.devices.gigafrost.gfutils import extend_header_table
class GigaFrostClient(Device):
@@ -11,7 +11,7 @@ from time import sleep, time
from threading import Thread
import numpy as np
import zmq
import matplotlib.pyplot as plt
#import matplotlib.pyplot as plt
from ophyd import Device, Signal, Component, Kind
TOPIC_FILTER = ''
@@ -101,8 +101,8 @@ class StdDaqPreview(Device):
def plot(self):
"""Plot the current image"""
image = self.image.get()
plt.imshow(np.log10(image+1), vmin=0, vmax=5)
plt.pause(self._throttle)
#plt.imshow(np.log10(image+1), vmin=0, vmax=5)
#plt.pause(self._throttle)
def plot_loop(self):
"""Blocking loop to keep plotting"""