More descriptive variable names in smart_scan, use resize in stitching with no default
This commit is contained in:
parent
7052917ff9
commit
4271c28045
1 changed files with 5 additions and 4 deletions
|
|
@ -59,11 +59,11 @@ def ensure_free_disk_space(path: str, min_space: int = 500000000) -> None:
|
||||||
Raises:
|
Raises:
|
||||||
NotEnoughFreeSpaceError if the remaining storage is below min_space
|
NotEnoughFreeSpaceError if the remaining storage is below min_space
|
||||||
"""
|
"""
|
||||||
du = shutil.disk_usage(path)
|
disk_usage = shutil.disk_usage(path)
|
||||||
if du.free < min_space:
|
if disk_usage.free < min_space:
|
||||||
raise NotEnoughFreeSpaceError(
|
raise NotEnoughFreeSpaceError(
|
||||||
"There is not enough free disk space to continue. "
|
"There is not enough free disk space to continue. "
|
||||||
f"(Required: {min_space >> 20}MB, free: {du.free >> 20}MB)."
|
f"(Required: {min_space >> 20}MB, free: {disk_usage.free >> 20}MB)."
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -716,6 +716,7 @@ class SmartScanThing(Thing):
|
||||||
self.stitch_scan(
|
self.stitch_scan(
|
||||||
logger=self._scan_logger,
|
logger=self._scan_logger,
|
||||||
scan_name=self._ongoing_scan_name,
|
scan_name=self._ongoing_scan_name,
|
||||||
|
stitch_resize=self._scan_data["stitch_resize"],
|
||||||
overlap=self._scan_data["overlap"],
|
overlap=self._scan_data["overlap"],
|
||||||
)
|
)
|
||||||
self.promote_stitch_files(self._scan_logger)
|
self.promote_stitch_files(self._scan_logger)
|
||||||
|
|
@ -1079,8 +1080,8 @@ class SmartScanThing(Thing):
|
||||||
self,
|
self,
|
||||||
logger: InvocationLogger,
|
logger: InvocationLogger,
|
||||||
scan_name: str,
|
scan_name: str,
|
||||||
|
stitch_resize: float,
|
||||||
overlap: float = 0.0,
|
overlap: float = 0.0,
|
||||||
stitch_resize: float = 0.25,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Generate a stitched image based on stage position metadata
|
"""Generate a stitched image based on stage position metadata
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue