Merge branch 'img-name' into 'v3'

Prepend images with img_

Closes #478

See merge request openflexure/openflexure-microscope-server!341
This commit is contained in:
Julian Stirling 2025-07-31 16:05:10 +00:00
commit 1e89ef0ff7

View file

@ -141,8 +141,14 @@ class CaptureInfo:
@property @property
def filename(self) -> str: def filename(self) -> str:
"""The filename for this image generated from the position.""" """The filename for this image generated from the position.
return f"{self.position['x']}_{self.position['y']}_{self.position['z']}.jpeg"
The file name is in the format ``img_{x}_{y}_{z}`` where x, y, and z are the
positions from the microscope stage.
"""
return (
f"img_{self.position['x']}_{self.position['y']}_{self.position['z']}.jpeg"
)
def _get_capture_by_id(captures: list[CaptureInfo], buffer_id: int) -> CaptureInfo: def _get_capture_by_id(captures: list[CaptureInfo], buffer_id: int) -> CaptureInfo: