comparison workflow/run_tomo.py @ 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 c99fc6a32869
comparison
equal deleted inserted replaced
5:543dba81eb15 6:05335876d167
872 theta = tomo_fields.theta_range['start'] 872 theta = tomo_fields.theta_range['start']
873 873
874 # Select image bounds 874 # Select image bounds
875 title = f'tomography image at theta={round(theta, 2)+0}' 875 title = f'tomography image at theta={round(theta, 2)+0}'
876 if img_x_bounds is not None: 876 if img_x_bounds is not None:
877 if is_int_pair(img_x_bounds)i and img_x_bounds[0] == -1 and img_x_bounds[1] == -1 877 if is_int_pair(img_x_bounds) and img_x_bounds[0] == -1 and img_x_bounds[1] == -1:
878 img_x_bounds = None 878 img_x_bounds = None
879 elif not is_index_range(img_x_bounds, ge=0, 879 elif not is_index_range(img_x_bounds, ge=0, le=first_image.shape[0]):
880 le=first_image.shape[0])): 880 raise ValueError(f'Invalid parameter img_x_bounds ({img_x_bounds})')
881 raise ValueError(f'Invalid parameter img_x_bounds ({img_x_bounds})')
882 if nxentry.instrument.source.attrs['station'] in ('id1a3', 'id3a'): 881 if nxentry.instrument.source.attrs['station'] in ('id1a3', 'id3a'):
883 pixel_size = nxentry.instrument.detector.x_pixel_size 882 pixel_size = nxentry.instrument.detector.x_pixel_size
884 # Try to get a fit from the bright field 883 # Try to get a fit from the bright field
885 tbf = np.asarray(reduced_data.data.bright_field) 884 tbf = np.asarray(reduced_data.data.bright_field)
886 tbf_shape = tbf.shape 885 tbf_shape = tbf.shape