Add punctuation to docstrings

This commit is contained in:
Julian Stirling 2025-07-10 02:03:02 +01:00
parent 4dc41bb008
commit 80beeea07b
34 changed files with 232 additions and 235 deletions

View file

@ -22,7 +22,7 @@ class BackgroundDetectThing(lt.Thing):
@lt.thing_setting
def background_distributions(self) -> Optional[ChannelDistributions]:
"""The statistics of the background image"""
"""The statistics of the background image."""
bd = self._background_distributions
if bd is None:
return None
@ -56,7 +56,7 @@ class BackgroundDetectThing(lt.Thing):
)
def background_mask(self, image: np.ndarray) -> np.ndarray:
"""Calculate a binary image, showing whether each pixel is background
"""Calculate a binary image, showing whether each pixel is background.
The image should be in LUV format, the ouput will be binary with the
same shape in the first two dimensions.
@ -78,7 +78,7 @@ class BackgroundDetectThing(lt.Thing):
@lt.thing_action
def background_fraction(self, cam: CamDep) -> float:
"""Determine what fraction of the current image is background
"""Determine what fraction of the current image is background.
This action will acquire a new image from the preview stream, then
evaluate whether it is foreground or background, by comparing it
@ -96,7 +96,7 @@ class BackgroundDetectThing(lt.Thing):
@lt.thing_action
def image_is_sample(self, cam: CamDep) -> bool:
"""Label the current image as either background or sample"""
"""Label the current image as either background or sample."""
b_fraction = self.background_fraction(cam)
fraction_threshold = self.fraction
@ -104,7 +104,7 @@ class BackgroundDetectThing(lt.Thing):
@lt.thing_action
def set_background(self, cam: CamDep):
"""Grab an image, and use its statistics to set the background
"""Grab an image, and use its statistics to set the background.
This should be run when the microscope is looking at an empty region,
and will calculate the mean and standard deviation of the pixel values