ewokstomo.tasks.online.reducedarkflat.OnlineReduceDarkFlat#
- class ewokstomo.tasks.online.reducedarkflat.OnlineReduceDarkFlat(inputs=None, varinfo=None, node_id=None, node_attrs=None, execinfo=None, profile_directory=None)[source]#
Bases:
Task- Parameters:
- read_stream(scan, stream_name, output_dtype=<class 'numpy.float32'>)[source]#
Reads data from a stream in the scan.
- run()[source]#
(ESRF-only) Reduce frames from an online scan stream (darks or flats).
This task can work in two modes:
Online: connects to a beacon data stream and reads frames in real-time.
Offline: reads frames from an existing HDF5 scan file.
- index: int
The index to assign to the reduced frame in the output file, needed for Nabu.
- reduction_method: str
The method to use for reduction (“mean” or “median”).
- output_file_path: str
The path to the output HDF5 file where the reduced frame will be saved.
- scan_key: str
The identifier key for the scan in the data store. Required for online mode.
- scan_file_path: str
The path to the existing HDF5 scan file (for offline mode).
- scan_number: int
The scan number within the HDF5 file (for offline mode).
- overwrite: bool, optional
Whether to overwrite the output file if it exists (default: True).
- output_dtype: numpy data-type, optional
The desired data type for the output frame, needed for Nabu (default: np.float32).