Skip to content
Snippets Groups Projects
Commit f60745b6 authored by payno's avatar payno
Browse files

Merge branch 'fix_1091' into 'main'

speed up stitching processing

Closes #1091

See merge request tomotools/tomwer!690
parents c73deb2f 72c420ad
No related branches found
No related tags found
No related merge requests found
...@@ -21,6 +21,7 @@ from tomwer.gui.utils.splashscreen import getMainSplashScreen ...@@ -21,6 +21,7 @@ from tomwer.gui.utils.splashscreen import getMainSplashScreen
from tomwer.gui.stitching.stitching import ZStitchingWindow as _ZStitchingWindow from tomwer.gui.stitching.stitching import ZStitchingWindow as _ZStitchingWindow
from tomwer.gui.stitching import action as stitching_action from tomwer.gui.stitching import action as stitching_action
from tomwer.gui.cluster.slurm import SlurmSettingsWidget from tomwer.gui.cluster.slurm import SlurmSettingsWidget
from tomwer.core.scan.scanbase import TomwerScanBase
logging.basicConfig(level=logging.WARNING) logging.basicConfig(level=logging.WARNING)
...@@ -296,7 +297,12 @@ def main(argv): ...@@ -296,7 +297,12 @@ def main(argv):
action="store_true", action="store_true",
default=False, default=False,
) )
parser.add_argument(
"--check-scans",
help="If True will check scans before adding them. This check scan validity (virtual dataset contains data...)",
action="store_true",
default=False,
)
options = parser.parse_args(argv[1:]) options = parser.parse_args(argv[1:])
if options.use_opengl_plot: if options.use_opengl_plot:
...@@ -342,6 +348,10 @@ def main(argv): ...@@ -342,6 +348,10 @@ def main(argv):
tomo_objs, (has_scans, has_vols) = get_tomo_objs_instances(options.tomo_objs) tomo_objs, (has_scans, has_vols) = get_tomo_objs_instances(options.tomo_objs)
for tomo_obj in tomo_objs: for tomo_obj in tomo_objs:
if isinstance(tomo_obj, TomwerScanBase):
tomo_obj.set_check_behavior(
run_check=options.check_scans
) # speed up processing
window.addTomoObj(tomo_obj=tomo_obj) window.addTomoObj(tomo_obj=tomo_obj)
if has_scans and has_vols: if has_scans and has_vols:
_logger.warning( _logger.warning(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment