Mercurial > repos > rv43 > chess_tomo
changeset 6:05335876d167 draft
planemo upload for repository https://github.com/rolfverberg/galaxytools commit f8c4bdb31c20c468045ad5e6eb255a293244bc6c-dirty
| author | rv43 |
|---|---|
| date | Mon, 20 Mar 2023 19:01:48 +0000 |
| parents | 543dba81eb15 |
| children | 7f6a1db287ee |
| files | __pycache__/fit.cpython-39.pyc __pycache__/general.cpython-39.pyc run_tomo_reduce tomo.log tomo_reduce.py tomo_reduce.xml workflow/.run_tomo.py.swp workflow/__pycache__/__version__.cpython-39.pyc workflow/__pycache__/models.cpython-39.pyc workflow/__pycache__/run_tomo.cpython-39.pyc workflow/run_tomo.py |
| diffstat | 11 files changed, 20 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- /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
--- /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]
--- 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
--- 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 @@ -<tool id="tomo_reduce" name="Tomo Reduce" version="0.1.2" python_template_version="3.9"> +<tool id="tomo_reduce" name="Tomo Reduce" version="0.1.3" python_template_version="3.9"> <description>Reduce tomography images</description> <macros> <import>tomo_macros.xml</import>
--- 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
