Mercurial > repos > rv43 > tomo
comparison tomo_setup.py @ 41:ef5c2f7b49ec draft
"planemo upload for repository https://github.com/rolfverberg/galaxytools commit 0d207c80e38a6019595ebe178f5678372b75f3e7"
| author | rv43 |
|---|---|
| date | Thu, 21 Apr 2022 14:21:38 +0000 |
| parents | 1bcca1f2adb4 |
| children | 26f99fdd8d61 |
comparison
equal
deleted
inserted
replaced
| 40:fa94fe25ca46 | 41:ef5c2f7b49ec |
|---|---|
| 25 help='Input file collections') | 25 help='Input file collections') |
| 26 parser.add_argument('-c', '--config', | 26 parser.add_argument('-c', '--config', |
| 27 help='Input config') | 27 help='Input config') |
| 28 parser.add_argument('--theta_range', | 28 parser.add_argument('--theta_range', |
| 29 help='Theta range (lower bound, upper bound, number of angles)') | 29 help='Theta range (lower bound, upper bound, number of angles)') |
| 30 parser.add_argument('--dark', | |
| 31 help='Dark field') | |
| 32 parser.add_argument('--bright', | |
| 33 help='Bright field') | |
| 34 parser.add_argument('--tomo', | |
| 35 help='First tomography image') | |
| 36 parser.add_argument('--detectorbounds', | |
| 37 help='Detector bounds') | |
| 38 parser.add_argument('--output_config', | 30 parser.add_argument('--output_config', |
| 39 help='Output config') | 31 help='Output config') |
| 40 parser.add_argument('--output_data', | 32 parser.add_argument('--output_data', |
| 41 help='Preprocessed tomography data') | 33 help='Preprocessed tomography data') |
| 42 parser.add_argument('-l', '--log', | 34 parser.add_argument('-l', '--log', |
| 58 logging.basicConfig(format=logging_format, level=level, force=True, | 50 logging.basicConfig(format=logging_format, level=level, force=True, |
| 59 handlers=[logging.StreamHandler()]) | 51 handlers=[logging.StreamHandler()]) |
| 60 | 52 |
| 61 logging.debug(f'config = {args.config}') | 53 logging.debug(f'config = {args.config}') |
| 62 logging.debug(f'theta_range = {args.theta_range.split()}') | 54 logging.debug(f'theta_range = {args.theta_range.split()}') |
| 63 logging.debug(f'dark = {args.dark}') | |
| 64 logging.debug(f'bright = {args.bright}') | |
| 65 logging.debug(f'tomo = {args.tomo}') | |
| 66 logging.debug(f'detectorbounds = {args.detectorbounds}') | |
| 67 logging.debug(f'output_config = {args.output_config}') | 55 logging.debug(f'output_config = {args.output_config}') |
| 68 logging.debug(f'output_data = {args.output_data}') | 56 logging.debug(f'output_data = {args.output_data}') |
| 69 logging.debug(f'log = {args.log}') | 57 logging.debug(f'log = {args.log}') |
| 70 logging.debug(f'is log stdout? {args.log is sys.stdout}') | 58 logging.debug(f'is log stdout? {args.log is sys.stdout}') |
| 71 logging.debug(f'tomoranges = {args.tomo_ranges}') | 59 logging.debug(f'tomoranges = {args.tomo_ranges}') |
| 160 tomo_stack_files.append(tomo_files[0]) | 148 tomo_stack_files.append(tomo_files[0]) |
| 161 num_collections += 1 | 149 num_collections += 1 |
| 162 | 150 |
| 163 # Preprocess the image files | 151 # Preprocess the image files |
| 164 galaxy_param = {'tdf_files' : tdf_files[0], 'tbf_files' : tbf_files[0], | 152 galaxy_param = {'tdf_files' : tdf_files[0], 'tbf_files' : tbf_files[0], |
| 165 'tomo_stack_files' : tomo_stack_files, 'dark_field_pngname' : args.dark, | 153 'tomo_stack_files' : tomo_stack_files, 'output_name' : args.output_data} |
| 166 'bright_field_pngname' : args.bright, 'tomo_field_pngname' : args.tomo, | |
| 167 'detectorbounds_pngname' : args.detectorbounds, 'output_name' : args.output_data} | |
| 168 tomo.genTomoStacks(galaxy_param) | 154 tomo.genTomoStacks(galaxy_param) |
| 169 if not tomo.is_valid: | 155 if not tomo.is_valid: |
| 170 IOError('Unable to load all required image files.') | 156 IOError('Unable to load all required image files.') |
| 171 | 157 |
| 172 # Displaying memory usage | 158 # Displaying memory usage |
