nabu.stitching.utils.post_processing
source module nabu.stitching.utils.post_processing
Classes
-
StitchingPostProcAggregation — for remote stitching each process will stitch a part of the volume or projections. Then once all are finished we want to aggregate them all to a final volume or NXtomo.
-
SlurmStitchingFollowerContext — Util class to provide user feedback from stitching done on slurm
-
SlurmStitchingFollowerThread — Thread to check progression of stitching slurm job(s) Read slurm jobs .out file each 'delay time' and look for a tqdm line at the end. If it exists then deduce progress from it.
source class StitchingPostProcAggregation(stitching_config: SingleAxisStitchingConfiguration, futures: Optional[tuple] = None, existing_objs_ids: Optional[tuple] = None, progress_bars: Optional[dict] = None)
for remote stitching each process will stitch a part of the volume or projections. Then once all are finished we want to aggregate them all to a final volume or NXtomo.
This is the goal of this class. Please be careful with API. This is already inheriting from a tomwer class
:param stitching_config: configuration of the stitching configuration :param futures: futures that just run :param existing_objs: futures that just run :param progress_bars: tqdm progress bars for each jobs
Methods
-
retrieve_tomo_objects — Return tomo objects to be stitched together. Either from future or from existing_objs
-
process — main function
source property StitchingPostProcAggregation.futures
source property StitchingPostProcAggregation.progress_bars: dict
source method StitchingPostProcAggregation.retrieve_tomo_objects() → tuple
Return tomo objects to be stitched together. Either from future or from existing_objs
Raises
-
RuntimeError
source method StitchingPostProcAggregation.dump_stitching_config_as_nx_process(file_path: str, data_path: str, overwrite: bool, process_name: str)
source property StitchingPostProcAggregation.stitching_config: SingleAxisStitchingConfiguration
source method StitchingPostProcAggregation.process() → None
main function
Raises
-
TypeError
-
RuntimeError
source method StitchingPostProcAggregation.follow_progress() → AbstractContextManager
source class SlurmStitchingFollowerContext(output_files_to_progress_bars: dict)
Bases : AbstractContextManager
Util class to provide user feedback from stitching done on slurm
source class SlurmStitchingFollowerThread(file_to_progress_bar: dict, delay_time: float = 0.5)
Bases : Thread
Thread to check progression of stitching slurm job(s) Read slurm jobs .out file each 'delay time' and look for a tqdm line at the end. If it exists then deduce progress from it.
file_to_progress_bar provide for each slurm .out file the progress bar to update
Attributes
-
name — A string used for identification purposes only.
-
ident — Thread identifier of this thread or None if it has not been started.
-
native_id — Native integral thread ID of this thread, or None if it has not been started.
-
daemon — A boolean value indicating whether this thread is a daemon thread.
Methods
-
cast_progress_line_from_log — Try to retrieve from a line from log the advancement (in percentage)
source property SlurmStitchingFollowerThread.file_to_progress_bar: dict
source method SlurmStitchingFollowerThread.run() → None
source method SlurmStitchingFollowerThread.join(timeout: Union[float, None] = None) → None
source staticmethod SlurmStitchingFollowerThread.cast_progress_line_from_log(line: str) → Optional[float]
Try to retrieve from a line from log the advancement (in percentage)