This commit is contained in:
gac-x05la
2024-12-13 14:30:39 +01:00
committed by mohacsi_i
parent 169ae61100
commit b80ed2d71c
4 changed files with 121 additions and 114 deletions
+2 -2
View File
@@ -94,7 +94,7 @@ def anothersequencescan(
Example:
--------
>>> demosequencescan(33, 180, 180, exp_time=0.005, exp_frames=1800, repeats=10)
>>> anothersequencescan(33, 180, 180, exp_time=0.005, exp_frames=1800, repeats=10)
"""
if not bl_check_beam():
raise RuntimeError("Beamline is not in ready state")
@@ -146,7 +146,7 @@ def anothersnapnstepscan(
Example:
--------
>>> demosequencescan(33, 180, 180, exp_time=0.005, exp_frames=1800, repeats=10)
>>> anothersnapnstepscan(33, 180, 180, exp_time=0.005, exp_frames=1800, repeats=10)
"""
if not bl_check_beam():
raise RuntimeError("Beamline is not in ready state")
+49
View File
@@ -0,0 +1,49 @@
def fede_darks(num, exp_time=None, exp_period=None, roix=None, roiy=None):
""" Fede 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)
"""
###### TODO check how to pass only the required arguments
###### TODO what we want is a function common to PCO.edge and GF
# Configure gigafrost
cfg = {}
if exp_time != None:
cfg.update({"exposure_time_ms": exp_time})
if exp_period != None:
cfg.update({"exposure_period_ms": exp_period})
if roix != None:
cfg.update({"image_width": roix})
if roiy != None:
cfg.update({"image_height": roiy})
dev.gfcam.configure(d=cfg)
dev.gfcam.cfgAcqMode.set(1).wait()
dev.gfcam.cfgEnableExt.set(0).wait()
dev.gfcam.cfgEnableSoft.set(0).wait()
dev.gfcam.cfgEnableAlways.set(1).wait()
dev.gfcam.cfgTrigExt.set(0).wait()
dev.gfcam.cfgTrigSoft.set(0).wait()
dev.gfcam.cfgTrigTimer.set(0).wait()
dev.gfcam.cfgTrigAuto.set(1).wait()
dev.gfcam.cfgExpExt.set(0).wait()
dev.gfcam.cfgExpSoft.set(0).wait()
dev.gfcam.cfgExpTimer.set(1).wait()
dev.gfcam.cfgCntStartBit.set(0).wait()
# Commit changes to GF
dev.gfcam.cmdSetParam.set(1).wait()
print("Handing over to 'scans.acquire_dark")
scans.acquire_dark(num=num)