GF in freerun mode
This commit is contained in:
@@ -239,6 +239,7 @@ class GigaFrostCamera(PSIDetectorBase):
|
||||
cmdSyncHw = Component(EpicsSignal, "SYNC_SWHW.PROC", put_complete=True, kind=Kind.omitted)
|
||||
cmdStartCamera = Component(EpicsSignal, "START_CAM", put_complete=True, kind=Kind.omitted)
|
||||
cmdSetParam = Component(EpicsSignal, "SET_PARAM.PROC", put_complete=True, kind=Kind.omitted)
|
||||
cfgAcqMode = Component(EpicsSignal, "ACQMODE", put_complete=True, kind=Kind.config)
|
||||
|
||||
# UDP header
|
||||
cfgUdpNumPorts = Component(EpicsSignal, "PORTS", put_complete=True, kind=Kind.config)
|
||||
@@ -268,6 +269,9 @@ class GigaFrostCamera(PSIDetectorBase):
|
||||
EpicsSignal, "SOFT_TRIG.PROC", put_complete=True, kind=Kind.omitted)
|
||||
cmdSoftExposure = Component(EpicsSignal, "SOFT_EXP", put_complete=True)
|
||||
|
||||
cfgAcqMode = Component(EpicsSignal, "ACQMODE", put_complete=True, kind=Kind.config)
|
||||
|
||||
|
||||
|
||||
###############################################################################################
|
||||
# Enable schemes
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
from .gigafrost_test import GigaFrostStepScan
|
||||
from .tomcat_scanbase import SnapAndStepScanBase, GigaStepScanBase, SequenceScanBase, SimpleFlyer
|
||||
# from .tutorial_fly_scan import AcquireDark, AcquireFlat, TutorialFlyScanContLine
|
||||
from .tutorial_fly_scan import AcquireDark
|
||||
@@ -7,8 +7,13 @@ from bec_server.scan_server.scans import Acquire, AsyncFlyScanBase
|
||||
|
||||
class AcquireDark(Acquire):
|
||||
scan_name = "acquire_dark"
|
||||
required_kwargs = ["exp_time", "num"]
|
||||
gui_config = {
|
||||
"Acquisition parameters" : ["exp_time", "num"]
|
||||
}
|
||||
|
||||
def __init__(self, num: int, **kwargs):
|
||||
|
||||
def __init__(self, num: int, exp_time: float, **kwargs):
|
||||
"""
|
||||
Acquire a dark image. This scan is used to acquire a dark image. The dark image is an image taken with the shutter
|
||||
closed and no beam on the sample. The dark image is used to correct the data images for dark current.
|
||||
@@ -25,7 +30,7 @@ class AcquireDark(Acquire):
|
||||
"""
|
||||
super().__init__(**kwargs)
|
||||
self.burst_at_each_point = num
|
||||
self.shutter = "hx" # change to the correct shutter device
|
||||
self.shutter = "eyex" # change to the correct shutter device
|
||||
|
||||
def scan_core(self):
|
||||
# close the shutter
|
||||
|
||||
43
tomcat_bec/scripts/tutorialscans.py
Normal file
43
tomcat_bec/scripts/tutorialscans.py
Normal file
@@ -0,0 +1,43 @@
|
||||
|
||||
|
||||
def tutorialdarks(num, exp_time=5, roix=2016, roiy=2016):
|
||||
""" Dutorial dark scan
|
||||
|
||||
This is a small BEC user-space scan that sets up the gigafrost and calls
|
||||
the low-level dark collection scan.
|
||||
|
||||
Example:
|
||||
--------
|
||||
tutorialdarks(num=100, exp_time=5)
|
||||
"""
|
||||
# Configure gigafrost
|
||||
cfg = {
|
||||
"ntotal": num, "nimages": 1,
|
||||
"exposure": exp_time, "period": 2*exp_time,
|
||||
"pixel_width": roix, "pixel_height": roiy
|
||||
}
|
||||
dev.gfclient.configure(d=cfg)
|
||||
|
||||
dev.gfclient.cam.cfgAcqMode.set(1).wait()
|
||||
dev.gfclient.cam.cfgEnableExt.set(0).wait()
|
||||
dev.gfclient.cam.cfgEnableSoft.set(0).wait()
|
||||
dev.gfclient.cam.cfgEnableAlways.set(1).wait()
|
||||
|
||||
dev.gfclient.cam.cfgTrigExt.set(0).wait()
|
||||
dev.gfclient.cam.cfgTrigSoft.set(0).wait()
|
||||
dev.gfclient.cam.cfgTrigTimer.set(0).wait()
|
||||
dev.gfclient.cam.cfgTrigAuto.set(1).wait()
|
||||
|
||||
dev.gfclient.cam.cfgExpExt.set(0).wait()
|
||||
dev.gfclient.cam.cfgExpSoft.set(0).wait()
|
||||
dev.gfclient.cam.cfgExpTimer.set(1).wait()
|
||||
|
||||
dev.gfclient.cam.cfgCntStartBit.set(0).wait()
|
||||
|
||||
# Commit changes to GF
|
||||
dev.gfclient.cam.cmdSetParam.set(1).wait()
|
||||
|
||||
|
||||
print("Handing over to 'scans.acquire_dark")
|
||||
scans.acquire_dark(num, exp_time)
|
||||
|
||||
Reference in New Issue
Block a user