From 1bdbe081674632f5b2f8169ba6578a1ab9265b67 Mon Sep 17 00:00:00 2001 From: Holger Frey Date: Thu, 29 Apr 2021 09:20:14 +0200 Subject: [PATCH] changed default output directory --- sensospot_images/__init__.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/sensospot_images/__init__.py b/sensospot_images/__init__.py index 2f4c5e1..da2a7e4 100644 --- a/sensospot_images/__init__.py +++ b/sensospot_images/__init__.py @@ -159,18 +159,20 @@ def process( "-o", "--output", default=None, - help="Output directory name, defaults to folder on desktop", + help="Output directory name, defaults to new folder in parent of source", ) @click.option( "-w", "--wells", default="*", + show_default=True, help="restrict to this wells, * = all", ) @click.option( "-e", "--Exposures", default="*", + show_default=True, help="restrict to this exposure ids, * = all", ) @click.option( @@ -178,21 +180,22 @@ def process( "--scale", type=int, default=3, + show_default=True, help="scale-up of images", ) @click.option( "--spots", default=False, is_flag=True, + show_default=True, help="include cropped images of spots", ) def run(source, output=None, wells="*", exposures="*", scale=3, spots=False): + source = Path(source) if output is None or not Path(output).is_dir(): - default = Path.home() / "Desktop" - if not default.is_dir(): - default = Path.home() + parent = source.absolute().parent now = datetime.now().strftime("%Y-%m-%d %H-%M-%S") - output = default / now + output = parent / now output.mkdir(exist_ok=True) process(source, output, wells, exposures, scale, spots)