Browse Source

changed default output directory

main
Holger Frey 4 years ago
parent
commit
1bdbe08167
  1. 13
      sensospot_images/__init__.py

13
sensospot_images/__init__.py

@ -159,18 +159,20 @@ def process( @@ -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( @@ -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)

Loading…
Cancel
Save