ewokstomo.tasks.online.reconstruct_slice.OnlineReconstructSlice#
- class ewokstomo.tasks.online.reconstruct_slice.OnlineReconstructSlice(inputs=None, varinfo=None, node_id=None, node_attrs=None, execinfo=None, profile_directory=None)[source]#
Bases:
Task(ESRF-only) Perform real-time tomography reconstruction on streaming data.
This task connects to a live scan stream and performs incremental reconstruction by processing projections in batches. It includes flat field correction, phase retrieval, and FBP reconstruction.
The reconstruction is performed on a single slice (middle by default) to minimize computational cost while providing real-time feedback.
Required Inputs#
- scan_keystr
Blissdata scan key for accessing the live stream
- output_pathstr
Directory path where reconstructed slice files will be saved. Individual batch results are saved as reconstructed_slice_{start}_{end}.h5
- rotation_motorstr
Name of the rotation axis motor in the scan
- total_nb_projectionint
Total expected number of projections in the scan
- center_of_rotationfloat
Center of rotation position
- batch_sizeint
Number of projections to process in each batch, default is 100
- reduced_dark_pathstr
Path to HDF5 file containing reduced dark frames
- reduced_flat_pathstr
Path to HDF5 file containing reduced flat frames
- distance_m:
Effective propagation distance (m)
- energy_keV:
Energy (keV)
- pixel_size_m:
detector pixel size (m)
Optional Inputs#
- delta_betafloat
Delta/beta ratio for Paganin phase retrieval. Default is 100.
- halftomobool
Whether the scan is a half-tomography (180°). Default is False.
- padding_modestr
Sinogram padding mode. Default is ‘edges’.
- extra_optionsdict
Additional backprojector options. Default is {‘centered_axis’: True}.
- slice_indexint or str
Slice index to reconstruct. Can be an integer index or ‘middle’, ‘first’, ‘last’. Default is ‘middle’.
Outputs#
- reconstructed_slices_directorystr
Path to the saved reconstructed slice files
- type inputs:
- param inputs:
- type varinfo:
- param varinfo:
- type node_id:
- param node_id:
- type node_attrs:
- param node_attrs:
- type execinfo:
- param execinfo:
- type profile_directory:
- param profile_directory:
- reconstruct_batch(scan, output_path, center_of_rotation, projections_indices, distance_m, energy_keV, pixel_size_m, rotation_motor, slice_index='middle', delta_beta=100.0, halftomo=False, padding_mode='edges', extra_options=None)[source]#
Reconstruct a batch of projections and accumulate the result.
- Return type:
Parameters#
- scanScan
Blissdata scan object
- output_pathstr
Path to save the reconstructed slice
- center_of_rotationfloat
Center of rotation
- projections_indiceslist of int
Indices of projections to process in this batch
- distance_mfloat
Effective propagation distance (m)
- energy_keVfloat
Energy (keV)
- pixel_size_mfloat
Detector pixel size (m)
- rotation_motorstr
Name of the rotation motor
- slice_indexint or str, optional
Slice index to reconstruct. Default is ‘middle’.
- delta_betafloat, optional
Phase retrieval parameter. Default is 100.
- halftomobool, optional
Half-tomography flag. Default is False.
- padding_modestr, optional
Sinogram padding mode. Default is ‘edges’.
- extra_optionsdict, optional
Additional backprojector options
- type output_path:
- param output_path:
- type center_of_rotation:
- param center_of_rotation:
- type projections_indices:
- param projections_indices:
- type distance_m:
- param distance_m:
- type energy_keV:
- param energy_keV:
- type pixel_size_m:
- param pixel_size_m:
- type rotation_motor:
- param rotation_motor:
- type slice_index:
- param slice_index:
- type delta_beta:
- param delta_beta:
- type halftomo:
- param halftomo:
- type padding_mode:
- param padding_mode:
- type extra_options:
- param extra_options: