diff --git a/nslsii/detectors/webcam.py b/nslsii/detectors/webcam.py index 35a7067..2286727 100644 --- a/nslsii/detectors/webcam.py +++ b/nslsii/detectors/webcam.py @@ -1,14 +1,14 @@ import datetime +import itertools import logging import time as ttime +import warnings from collections import deque -import itertools from pathlib import Path import cv2 import h5py import numpy as np -from area_detector_handlers.handlers import HandlerBase from event_model import compose_resource from ophyd import Component as Cpt from ophyd import Device, Signal @@ -19,7 +19,6 @@ logger = logging.getLogger("vstream") - class VideoStreamDet(Device): image = Cpt(ExternalFileReference, kind="normal") mean = Cpt(Signal, value=0.0, kind="hinted") @@ -34,6 +33,10 @@ def __init__( frame_shape=(1080, 1920), **kwargs, ): + warnings.warn( + f"This class {self.__class__.__name__} will be removed in the future." + ) + super().__init__(*args, **kwargs) self._root_dir = root_dir @@ -73,13 +76,14 @@ def stage(self): self._h5file_desc = h5py.File(self._data_file, "x") group = self._h5file_desc.create_group("/entry") - self._dataset = group.create_dataset("averaged", - data=np.full(fill_value=np.nan, - shape=(1, *self._frame_shape)), - maxshape=(None, *self._frame_shape), - chunks=(1, *self._frame_shape), - dtype="float64", - compression="lzf") + self._dataset = group.create_dataset( + "averaged", + data=np.full(fill_value=np.nan, shape=(1, *self._frame_shape)), + maxshape=(None, *self._frame_shape), + chunks=(1, *self._frame_shape), + dtype="float64", + compression="lzf", + ) self._counter = itertools.count() def trigger(self, *args, **kwargs): diff --git a/nslsii/motors/__init__.py b/nslsii/motors/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/requirements.txt b/requirements.txt index 7e1d584..9146b53 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ appdirs -bluesky>=1.8.1 bluesky-kafka>=0.8.0 +bluesky>=1.8.1 caproto databroker h5py @@ -12,6 +12,7 @@ matplotlib msgpack >=1.0.0 msgpack-numpy numpy +opencv-python ophyd ophyd-async packaging