tomoscan.tomoscan_stream_7bm
¶
Software for tomography stream scanning with EPICS at APS beamline 2-BM
This class support tomoStream by providing:
- Dark-flat field image PVs broadcasting
- Dark-flat field images are broadcasted using PVaccess. Dark-flat field images are also saved in a temporary hdf5 file that are re-written whenever new flat/dark fields are acquired. Acquisition of dark and flat fields is performed without stopping rotation of the stage. Dark-flat field images can also be binned setting the binning parameter in ROI1 plugin.
- On-demand capturing to an hdf5 file
- The capturing/saving to an hdf5 file can be done on-demand by pressing the Capture proj button in the Stream MEDM control screen. Whenever capturing is done, dark/flat fields from the temporarily hdf5 file are added to the file containing the projections and the experimental meta data. In addition, the circular buffer plugin (CB1) of AreaDetector is used to store a set of projections acquired before capturing is started. This allows to save projections containing information about the sample right before a sample change is detected. Data from the circular buffer is also added to the hdf5 after capturing is done. The resulting hdf5 file has the same format as in regular single tomoscan file.
Classes¶
- TomoScanStream2BM
Derived class for tomography scanning in streaming mode with EPICS at APS beamline 2-BM
Functions:
- class tomoscan.tomoscan_stream_7bm.TomoScanStream7BM(pv_files, macros)[source]¶
Bases:
TomoScanStreamPSO
Derived class used for tomography scanning in streamaing mode with EPICS at APS beamline 2-BM
- Parameters
pv_files (list of str) – List of files containing EPICS pvNames to be used.
macros (dict) – Dictionary of macro definitions to be substituted when reading the pv_files
- close_shutter()[source]¶
Closes the shutter to collect dark fields and at the end of a scan This does the following:
Checks if we are in testing mode. If we are, do nothing
Closes the 7-BM-B fast shutter.
Closes the beamline shutter.
- end_scan()[source]¶
Performs the operations needed at the very end of a scan.
This does the following: - Calls
save_configuration()
. - Put the camera back in “FreeRun” mode and acquiring so the user sees live images.Sets the speed of the rotation stage back to the maximum value.
Calls
move_sample_in()
.Calls the base class method.
Closes shutter.
- move_sample_in()[source]¶
Moves the sample to the in beam position for collecting projections.
The in-beam position is defined by the
SampleInX
andSampleInY
PVs.Which axis to move is defined by the
FlatFieldAxis
PV, which can beX
,Y
, orBoth
.
- move_sample_out()[source]¶
Moves the sample to the out of beam position for collecting flat fields.
The out of beam position is defined by the
SampleOutX
andSampleOutY
PVs.Which axis to move is defined by the
FlatFieldAxis
PV, which can beX
,Y
, orBoth
.
- open_shutter()[source]¶
Opens the shutter to collect flat fields or projections.
This does the following:
Checks if we are in testing mode. If we are, do nothing.
- Opens the front end shutter, waiting for it to indicate it is open.
This is copied from the 2-BM implementation 9/2020
Opens the 7-BM-B fast shutter.
- set_trigger_mode(trigger_mode, num_images)[source]¶
Sets the trigger mode for the camera.
- Parameters
trigger_mode (str) – Choices are: “FreeRun”, “Internal”, or “PSOExternal”
num_images (int) – Number of images to collect. Ignored if trigger_mode=”FreeRun”. This is used to set the
NumImages
PV of the camera.