comparison spyboat_cli.py @ 1:639d2031d998 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 88e9d9a220d160f55e0472719bb463143a4eefa5"
author iuc
date Mon, 30 Nov 2020 21:11:23 +0000
parents 76733d05d8ef
children
comparison
equal deleted inserted replaced
0:76733d05d8ef 1:639d2031d998
163 163
164 if arguments.report_img_path != '.': 164 if arguments.report_img_path != '.':
165 logger.info(f'Creating report directory {arguments.report_img_path}') 165 logger.info(f'Creating report directory {arguments.report_img_path}')
166 os.mkdir(arguments.report_img_path) 166 os.mkdir(arguments.report_img_path)
167 167
168 # 4 snapshots each 168 # 4 figures per snapshot
169 Nsnap = 7 169 Nsnap = 8
170 NFrames = movie.shape[0] 170 NFrames = movie.shape[0]
171 # show only frames at least one Tmin 171 # show only frames at least one Tmin
172 # away from the edge (-effects) 172 # away from the edge (-effects)
173 start_frame = int(Wkwargs['Tmin'] / Wkwargs['dt']) 173 start_frame = int(Wkwargs['Tmin'] / Wkwargs['dt'])
174 174
178 start_frame = 0 178 start_frame = 0
179 179
180 frame_increment = int((NFrames - 2 * start_frame) / Nsnap) 180 frame_increment = int((NFrames - 2 * start_frame) / Nsnap)
181 snapshot_frames = range(start_frame, NFrames - start_frame, frame_increment) 181 snapshot_frames = range(start_frame, NFrames - start_frame, frame_increment)
182 182
183 # get all relevant parameters
184 par_str = ''
185 for arg in vars(arguments):
186 if 'out' in arg or 'path' in arg or 'html' in arg:
187 continue
188 par_str += f'{arg} -> {getattr(arguments, arg)}\n'
189
183 for snapshot_frame in snapshot_frames: 190 for snapshot_frame in snapshot_frames:
184 output_report.produce_snapshots(movie, results, snapshot_frame, Wkwargs, img_path=arguments.report_img_path) 191 output_report.produce_snapshots(movie, results, snapshot_frame, Wkwargs, img_path=arguments.report_img_path)
185 192
186 output_report.produce_distr_plots(results, Wkwargs, img_path=arguments.report_img_path) 193 output_report.produce_distr_plots(results, Wkwargs, img_path=arguments.report_img_path)
187 194
188 output_report.create_html(snapshot_frames, arguments.html_fname) 195 output_report.create_html(snapshot_frames, par_str, arguments.html_fname)
189 196
190 except FileExistsError as e: 197 except FileExistsError as e:
191 logger.critical(f"Could not create html report directory: {repr(e)}") 198 logger.critical(f"Could not create html report directory: {repr(e)}")
192 199
193 # --- save out result movies --- 200 # --- save out result movies ---