This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##### imports ###### | |
import time | |
from functools import partial | |
import bluesky.plan_stubs as bps | |
import bluesky.preprocessors as bpp | |
from bluesky.simulators import summarize_plan | |
from bluesky.callbacks import LiveTable | |
from xpdacq.xpdacq import glbl | |
from xpdacq.beamtime import ( | |
close_shutter_stub, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from xpdacq.beamtime import _open_shutter_stub, _close_shutter_stub | |
import bluesky.plans as bp | |
import bluesky.plan_stubs as bps | |
import bluesky.preprocessors as bpp | |
def inner_shutter_control(msg): | |
if msg.command == "trigger": | |
def inner(): | |
yield from _open_shutter_stub() | |
yield msg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from functools import partial | |
import bluesky.plans as bp | |
import bluesky.plan_stubs as bps | |
from xpdacq.glbl import glbl | |
from xpdacq.xpdacq_conf import xpd_configuration | |
from xpdconf.conf import XPD_SHUTTER_CONF | |
def _open_shutter_stub(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bluesky.plan_stubs as bps | |
from xpdacq.beamtime import _check_mini_expo | |
def configure_area_det_expo(expo): | |
area_det = xpd_configuration['area_det'] | |
# compute number of frames | |
acq_time = area_det.cam.acquire_time.get() | |
_check_mini_expo(exposure, acq_time) | |
num_frame = np.ceil(exposure / acq_time) | |
computed_exposure = num_frame * acq_time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import numpy as np | |
import bluesky.plans as bp | |
import bluesky.plan_stubs as bps | |
import bluesky.preprocessors as bpp | |
from bluesky.utils import Msg, short_uid as _short_uid | |
from bluesky.preprocessors import subs_wrapper | |
from bluesky.simulators import summarize_plan | |
from bluesky.callbacks import LiveTable | |
from xpdacq.xpdacq_conf import xpd_configuration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ACQ SIDE | |
# ====================================================== | |
import bluesky.plans as bp | |
import bluesky.preprocessors as bpp | |
import bluesky.plan_stubs as bps | |
from bluesky.utils import Msg, short_uid as _short_uid | |
from bluesky.preprocessors import subs_wrapper | |
from bluesky.simulators import summarize_plan | |
from bluesky.callbacks import LiveTable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# command at bluesky level | |
test_det = pe3c | |
test_det.cam.acquire_time.put(1) | |
test_det.images_per_set.put(60) | |
RE(bp.count(1)) | |
# reproduce the bug in xpdAcq | |
glbl['frame_acq_time'] = 1 | |
glbl['dk_window'] = 0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bluesky.plans as bp | |
import bluesky.plan_stubs as bps | |
from bluesky.utils import Msg, short_uid as _short_uid | |
from bluesky.preprocessors import subs_wrapper | |
from bluesky.simulators import summarize_plan | |
from bluesky.callbacks import LiveTable | |
# shutter configuration, change wrt beamline! | |
shutter = sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from itertools import tee | |
import bluesky.plans as bp | |
import bluesky.plan_stubs as bps | |
import bluesky.preprocessors as bpp | |
from bluesky.run_engine import RunEngine | |
from bluesky.simulators import summarize_plan | |
from ophyd.sim import hw | |
ns = hw() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bluesky.plans as bp | |
import bluesky.preprocessors as bpp | |
from bluesky.callbacks import LiveTable | |
from xpdacq.beamtime import _configure_area_det | |
# configure to 5s | |
_configure_area_det(5) |
NewerOlder