APS-2BM-MIC / ipython-user2bmb

ipython configurations for the tomography instrument
2 stars 5 forks source link

refactor: one "spin" is one event #11

Closed prjemian closed 6 years ago

prjemian commented 6 years ago

Per telecon on 2018-02-08 with NSLS-II team, consider one tomo "spin" (single tomography rotation conducted as a hardware-directed fly scan from EPICS) is one BlueSky event.

A single HDF5 file (no SWMR feature used, I believe) is produced by one spin with ca. 1500 images and 180 degree rotation. It may not be practical to stream a single image frame (one part of a spin) from the EPICS areaDetector through the BlueSky python stack and out the custom 0MQ pipe to the Mona project processing pipeline.

Instead, start a spin as an ophyd Flyer and use the existing 0MQ callback from BlueSky to pipe flyer collection to the Mona project processing pipeline. EPICS Area Detector is responsible for streaming all the image frames into the HDF5 file. This file can be read by the Mona project pipeline after the spin.

It might be possible to grab some image frames during the spin and pipeline them to the Mona processing, as interim data. Might be interesting. Might not.

Since the motion controller is responsible for triggering detector image frames, each frame is collected coincident with a specific rotation angle. The rotation motor position is computed from the image frame number, to the resolution of the motor controller. We do not need to monitor rotation angle as a PV, with its associated latency in reporting.

prjemian commented 6 years ago

so, create an ophyd Flyer for one tomo spin

start with the _plan_edgeAcquisition, the while loop is the waiting for finish part.