tomostream.tomostream

Functions:

tomostream.tomostream

class tomostream.tomostream.TomoStream(pv_files, macros)[source]

Bases: object

Class for streaming reconstuction of ortho-slices on a machine with GPU. The class creates and broadcasts a pva type pv for concatenated reconstructions of (x,y,z) ortho-slices. Reconstructons are done by the FBP formula with direct discretization of the circular integral. Projection data is taken from the detector pv (pva type channel) and stored in a queue, dark and flat fields are taken from the pv broadcasted by the server on the detector machine (see tomoscan_stream.py from Tomoscan package).

Parameters:

args (dict) – Dictionary of pv variables.

abort_stream()[source]

Aborts streaming that is running.

add_dark(pv)[source]

PV monitoring function for reading new dark fields from manually running pv server on the detector machine

add_data(pv)[source]

PV monitoring function for adding projection data and corresponding angle to the queue

add_flat(pv)[source]

PV monitoring function for reading new flat fields from manually running pv server on the detector machine

add_theta(pv)[source]

Notify about theta update

begin_stream()[source]

Run streaming reconstruction by sending new incoming projections from the queue to the solver class, and broadcasting the reconstruction result to a pv variable

monitor_click()[source]
pv_callback(pvname=None, value=None, char_value=None, **kw)[source]

Callback function that is called by pyEpics when certain EPICS PVs are changed

read_pv_file(pv_file_name, macros)[source]

Reads a file containing a list of EPICS PVs to be used by TomoScan.

Parameters:
  • pv_file_name (str) – Name of the file to read

  • macros (dict) – Dictionary of macro substitution to perform when reading the file

reinit_monitors()[source]

Reinit pv monitoring functions with updating data sizes

reset_watchdog()[source]

Sets the watchdog timer to 5 every 3 seconds

show_pvs()[source]

Prints the current values of all EPICS PVs in use.

The values are printed in three sections:

  • config_pvs : The PVs that are part of the scan configuration and are saved by save_configuration()

  • control_pvs : The PVs that are used for EPICS control and status, but are not saved by save_configuration()

  • pv_prefixes : The prefixes for PVs that are used for the areaDetector camera, file plugin, etc.

signal_handler(sig, frame)[source]

Calls abort_scan when ^C or ^Z is typed

wait_pv(epics_pv, wait_val, timeout=-1)[source]

Wait on a pv to be a value until max_timeout (default forever) delay for pv to change