Apply suggestions from code review of branch fast-stack
Co-authored-by: Beth Probert <beth_probert@outlook.com>
This commit is contained in:
parent
fc6c13f40e
commit
46f3d21632
2 changed files with 7 additions and 6 deletions
|
|
@ -101,8 +101,8 @@ class StackParams:
|
||||||
def stack_z_range(self) -> int:
|
def stack_z_range(self) -> int:
|
||||||
"""The range of the z stack, in steps
|
"""The range of the z stack, in steps
|
||||||
|
|
||||||
Note that this is the range of the minimum number of image captured,
|
Note that this is the range of the minimum number of images captured,
|
||||||
which is also the range of the images sored in memory that can be
|
which is also the range of the images stored in memory that can be
|
||||||
saved."""
|
saved."""
|
||||||
return self.stack_dz * (self.min_images_to_test - 1)
|
return self.stack_dz * (self.min_images_to_test - 1)
|
||||||
|
|
||||||
|
|
@ -147,7 +147,7 @@ class CaptureInfo:
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def filename(self) -> str:
|
def filename(self) -> str:
|
||||||
"""The filename for this image generated from the poistion"""
|
"""The filename for this image generated from the position"""
|
||||||
return f"{self.position['x']}_{self.position['y']}_{self.position['z']}.jpeg"
|
return f"{self.position['x']}_{self.position['y']}_{self.position['z']}.jpeg"
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -488,7 +488,8 @@ class AutofocusThing(Thing):
|
||||||
cam=cam,
|
cam=cam,
|
||||||
)
|
)
|
||||||
|
|
||||||
# Return the z position of the sharpest image, for path planning and tracking
|
# Return whether or not the smart stack was successful, and the z position of
|
||||||
|
# the sharpest image, for path planning and tracking
|
||||||
return success, _get_capture_by_id(captures, sharpest_id).position["z"]
|
return success, _get_capture_by_id(captures, sharpest_id).position["z"]
|
||||||
|
|
||||||
def reset_stack(
|
def reset_stack(
|
||||||
|
|
|
||||||
|
|
@ -27,8 +27,8 @@ def random_image():
|
||||||
|
|
||||||
def random_metadata():
|
def random_metadata():
|
||||||
"""Create a misc dictionary to pretend to be metadata"""
|
"""Create a misc dictionary to pretend to be metadata"""
|
||||||
# Not very metadata like, but we are just checking that the same dict it is
|
# Not very metadata like, but we are just checking that the same dict it
|
||||||
# returned
|
# is returned
|
||||||
return {"a": randint(1, 100), "b": randint(1, 100)}
|
return {"a": randint(1, 100), "b": randint(1, 100)}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue