Mercurial > repos > rv43 > plot_smb_tiff
comparison plot_smb_tiff.py @ 3:6be076b081c4 draft
planemo upload for repository https://github.com/rolfverberg/galaxytools commit b5d7c209a0ba024789ccfb89ec874e8b9c280149-dirty
author | rv43 |
---|---|
date | Mon, 13 Mar 2023 15:49:12 +0000 |
parents | 9f331fb5be2c |
children | 0ffa2fbc7546 |
comparison
equal
deleted
inserted
replaced
2:576071826197 | 3:6be076b081c4 |
---|---|
11 def __main__(): | 11 def __main__(): |
12 | 12 |
13 # Parse command line arguments | 13 # Parse command line arguments |
14 parser = argparse.ArgumentParser( | 14 parser = argparse.ArgumentParser( |
15 description='Plot an image for the SMB schema') | 15 description='Plot an image for the SMB schema') |
16 parser.add_argument('-o', '--output_file', | |
17 help='''Output file name.''') | |
16 parser.add_argument('--cycle', | 18 parser.add_argument('--cycle', |
17 required=True, | 19 required=True, |
18 help='''Run cycle.''') | 20 help='''Run cycle.''') |
19 parser.add_argument('--station', | 21 parser.add_argument('--station', |
20 required=True, | 22 required=True, |
122 raise ValueError('Unable to find a valid image') | 124 raise ValueError('Unable to find a valid image') |
123 data = plt.imread(image_file) | 125 data = plt.imread(image_file) |
124 title = 'image_files[0]' | 126 title = 'image_files[0]' |
125 plt.figure(title) | 127 plt.figure(title) |
126 plt.imshow(data) | 128 plt.imshow(data) |
127 plt.savefig('image.jpg') | 129 plt.savefig(args.output_file) |
128 plt.close(fig=title) | 130 plt.close(fig=title) |
129 | 131 |
130 if __name__ == "__main__": | 132 if __name__ == "__main__": |
131 __main__() | 133 __main__() |
132 | 134 |