# HG changeset patch # User rv43 # Date 1679338908 0 # Node ID 05335876d167bc3dcd2a8dc91fb5179f3fcc6af4 # Parent 543dba81eb1595c5ccf9f041c45ea9f133632183 planemo upload for repository https://github.com/rolfverberg/galaxytools commit f8c4bdb31c20c468045ad5e6eb255a293244bc6c-dirty diff -r 543dba81eb15 -r 05335876d167 __pycache__/fit.cpython-39.pyc Binary file __pycache__/fit.cpython-39.pyc has changed diff -r 543dba81eb15 -r 05335876d167 __pycache__/general.cpython-39.pyc Binary file __pycache__/general.cpython-39.pyc has changed diff -r 543dba81eb15 -r 05335876d167 run_tomo_reduce --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run_tomo_reduce Mon Mar 20 19:01:48 2023 +0000 @@ -0,0 +1,11 @@ +#!/bin/bash + +# From workflow +#python -m workflow run_tomo -i sobhani-3249-A.yaml -o sobhani-3249-A_reduce.nxs -n 48 -s 'only' --reduce_data +#python -m workflow run_tomo -i tenstom_1304r-1_one_stack.yaml -o tenstom_1304r-1_one_stack_reduce.nxs -n 48 -s 'only' --reduce_data +#python -m workflow run_tomo -i tenstom_1304r-1.yaml -o tenstom_1304r-1_reduce.nxs -n 48 -s 'only' --reduce_data + +# As Galaxy tool: +python tomo_reduce.py -i "../../../Tomo/sobhani-3249-A_start.nxs" -o sobhani-3249-A_reduce.nxs --log_level INFO -l tomo.log --galaxy_flag --img_x_bounds -1 -1 +#python tomo_reduce.py -i tenstom_1304r-1_one_stack_start.nxs -o tenstom_1304r-1_one_stack_reduce.nxs --log_level INFO -l tomo.log --galaxy_flag #--img_x_bounds 582 1509 +#python tomo_reduce.py -i tenstom_1304r-1_start.nxs -o tenstom_1304r-1_reduce.nxs --log_level INFO -l tomo.log --galaxy_flag #--img_x_bounds 713 1388 diff -r 543dba81eb15 -r 05335876d167 tomo.log --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tomo.log Mon Mar 20 19:01:48 2023 +0000 @@ -0,0 +1,4 @@ +2023-03-20 15:01:16,794 : INFO - tomo_reduce : __main__ - input_file = ../../../Tomo/sobhani-3249-A_start.nxs +2023-03-20 15:01:16,794 : INFO - tomo_reduce : __main__ - output_file = sobhani-3249-A_reduce.nxs +2023-03-20 15:01:16,794 : INFO - tomo_reduce : __main__ - galaxy_flag = True +2023-03-20 15:01:16,794 : INFO - tomo_reduce : __main__ - img_x_bounds = [-1, -1] diff -r 543dba81eb15 -r 05335876d167 tomo_reduce.py --- a/tomo_reduce.py Mon Mar 20 18:54:48 2023 +0000 +++ b/tomo_reduce.py Mon Mar 20 19:01:48 2023 +0000 @@ -79,7 +79,7 @@ # Read input file data = tomo.read(args.input_file) - print('data:\n{data.tree}') + print(f'data:\n{data.tree}') return # Generate reduced tomography images diff -r 543dba81eb15 -r 05335876d167 tomo_reduce.xml --- a/tomo_reduce.xml Mon Mar 20 18:54:48 2023 +0000 +++ b/tomo_reduce.xml Mon Mar 20 19:01:48 2023 +0000 @@ -1,4 +1,4 @@ - + Reduce tomography images tomo_macros.xml diff -r 543dba81eb15 -r 05335876d167 workflow/.run_tomo.py.swp Binary file workflow/.run_tomo.py.swp has changed diff -r 543dba81eb15 -r 05335876d167 workflow/__pycache__/__version__.cpython-39.pyc Binary file workflow/__pycache__/__version__.cpython-39.pyc has changed diff -r 543dba81eb15 -r 05335876d167 workflow/__pycache__/models.cpython-39.pyc Binary file workflow/__pycache__/models.cpython-39.pyc has changed diff -r 543dba81eb15 -r 05335876d167 workflow/__pycache__/run_tomo.cpython-39.pyc Binary file workflow/__pycache__/run_tomo.cpython-39.pyc has changed diff -r 543dba81eb15 -r 05335876d167 workflow/run_tomo.py --- a/workflow/run_tomo.py Mon Mar 20 18:54:48 2023 +0000 +++ b/workflow/run_tomo.py Mon Mar 20 19:01:48 2023 +0000 @@ -874,11 +874,10 @@ # Select image bounds title = f'tomography image at theta={round(theta, 2)+0}' if img_x_bounds is not None: - if is_int_pair(img_x_bounds)i and img_x_bounds[0] == -1 and img_x_bounds[1] == -1 + if is_int_pair(img_x_bounds) and img_x_bounds[0] == -1 and img_x_bounds[1] == -1: img_x_bounds = None - elif not is_index_range(img_x_bounds, ge=0, - le=first_image.shape[0])): - raise ValueError(f'Invalid parameter img_x_bounds ({img_x_bounds})') + elif not is_index_range(img_x_bounds, ge=0, le=first_image.shape[0]): + raise ValueError(f'Invalid parameter img_x_bounds ({img_x_bounds})') if nxentry.instrument.source.attrs['station'] in ('id1a3', 'id3a'): pixel_size = nxentry.instrument.detector.x_pixel_size # Try to get a fit from the bright field