Skip to content

Commit a027f68

Browse files
rickwierengaclaude
andcommitted
SartoriusEntris2: rename read_weight to measure_weight
"measure" describes the operation accurately for balances regardless of whether they have a display, unlike "read". Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 14366c3 commit a027f68

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

docs/user_guide/sartorius/entris2/hello-world.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@
2929
{
3030
"cell_type": "markdown",
3131
"id": "entris2-read-md",
32-
"source": "## Read the weight\n\n`read_weight()` returns the current value in grams (`<Esc>P` print command).",
32+
"source": "## Measure the weight\n\n`measure_weight()` returns the current value in grams (`<Esc>P` print command).",
3333
"metadata": {}
3434
},
3535
{
3636
"cell_type": "code",
3737
"id": "entris2-read-code",
38-
"source": "weight = await scale.read_weight()\nprint(f\"Weight: {weight} g\")",
38+
"source": "weight = await scale.measure_weight()\nprint(f\"Weight: {weight} g\")",
3939
"metadata": {},
4040
"execution_count": null,
4141
"outputs": []

pylabrobot/sartorius/entris.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,8 @@ def _parse_weight(response: str) -> float:
170170

171171
# === Public API ===
172172

173-
async def read_weight(self) -> float:
174-
"""Read the current weight in grams (<ESC>P)."""
173+
async def measure_weight(self) -> float:
174+
"""Measure the current weight in grams (<ESC>P)."""
175175
weight = self._parse_weight(await self.send_command("P"))
176176
logger.info("[Sartorius %s] weight read: weight_g=%s", self.serial_number, weight)
177177
return weight

0 commit comments

Comments
 (0)