diff spyboat_cli.py @ 4:a4c6fcf2c456 draft

"planemo upload commit 0584e8878deaf91614c6bb3c0122975300132c25"
author gregor.m
date Thu, 26 Nov 2020 16:40:47 +0000
parents 4d7f30a7e2f6
children d5a4180410c4
line wrap: on
line diff
--- a/spyboat_cli.py	Tue Nov 24 13:06:26 2020 +0000
+++ b/spyboat_cli.py	Thu Nov 26 16:40:47 2020 +0000
@@ -12,7 +12,7 @@
 import output_report
 
 logging.basicConfig(level=logging.INFO, stream=sys.stdout, force=True)
-logger = logging.getLogger('wrapper')
+logger = logging.getLogger('spyboat-cli')
 
 # ----------command line parameters ---------------
 
@@ -79,9 +79,10 @@
     movie = spyboat.open_tif(arguments.input_path)
 except FileNotFoundError:
     logger.critical(f"Couldn't open {arguments.input_path}, check movie storage directory!")
-
     sys.exit(1)
-
+# problems get logged in 'open_tif'
+if movie is None:
+    sys.exit(1)
 # -------- Do (optional) spatial downsampling ---------------------------
 
 scale_factor = arguments.rescale
@@ -162,8 +163,8 @@
         logger.info(f'Creating report directory {arguments.report_img_path}')
         os.mkdir(arguments.report_img_path)    
 
-    # make 6 times 4 snapshots each
-    Nsnap = 6
+    # 4 snapshots each
+    Nsnap = 7
     NFrames = movie.shape[0]
     # show only frames at least one Tmin
     # away from the edge (-effects)