tomwer.core.reconstruction.nabu.slice.slices.run_slices_reconstruction#

tomwer.core.reconstruction.nabu.slice.slices.run_slices_reconstruction(scan, config, slices, cluster_config=None, dry_run=False, advancement=None, process_id=None, instantiate_classes_only=False, invalid_slice_callback=None)#

call nabu for a reconstruction on scan with the given configuration

Parameters:
  • scan (TomwerScanBase) – scan to reconstruct

  • config (dict) – configuration to run the reconstruction. Contains nabu reconstruction parameters and slurm cluster configuration if requested (key: slurm-cluster).

  • slices (dict) – slices to be reconstruct. For each plane to reconstruct we expect to have the slices ot reconstruct as a str

  • dry_run (bool) – do we want to run dry

  • stderr – file to redirect stderr

  • stdout – file to redirect stdout

  • advancement – optional Progress class to display advancement

  • process_id (int | None) – optional process id

  • instantiate_class_only – if we don’t want to run the SingleSliceRunner but only return them. Use case: we want to keep a hand on processing and it can be cancelled

Return type:

tuple

Returns:

(all_succeed, stdouts, stderrs, final_configs, future_scan) * all_succeed: bool, True if all the reconstruction succeed or if all job request succeed. * stdouts: list of stdout of job reconstruction or job requests * stderrs: list of stderr of job reconstruction or job requests * final_configs: list of configurations submits to nabu * future_scan: FutureTomwerScan | None future scan containing futures pointing to job submited to the cluster. None if local reconstruction

Behavior: will clear the last slices reconstructed