Skip to content

Commit ed1a76f

Browse files
new ui hardware cal
1 parent da305b7 commit ed1a76f

6 files changed

Lines changed: 59 additions & 38 deletions

File tree

AGENTS.md

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,21 @@
1212
- `static/vid/` houses mp4/gif assets that can be linked directly from documentation.
1313
- Files placed under `static/` are copied verbatim to the built site, so maintain clean filenames and avoid private data.
1414
- **Automation and build scripts** rely on the standard Docusaurus npm scripts defined in `package.json` (e.g., `npm run start`, `npm run build`).
15+
- For user-guide docs, images live under `static/img/user-guide/<section>/<page>/`.
16+
- `<section>` is the slugified first folder under `user-guide/`, and `<page>` is the slugified markdown filename.
17+
- Example: for `user-guide/03-Extending your Pioreactor/02-Calibrations/08-hardware-calibrations.md`, the standard image directory is:
18+
- `static/img/user-guide/03-extending-your-pioreactor/08-hardware-calibrations/`
19+
- A referenced image would be: `/img/user-guide/03-extending-your-pioreactor/08-hardware-calibrations/<image>.png`
1520

16-
## Screenshot guidelines
17-
- Screenshots are committed as PNGs and grouped in sub-folders under `static/img/` (for example `static/img/user-guide/`).
18-
- Existing screenshots are usually high-resolution captures taken from the Pioreactor UI; the common sizes range from ~1400×750 up to ~3200×1650 to keep interface text legible on Retina displays.
19-
- When adding new screenshots:
20-
- Capture the full relevant UI panel without cropping away context, and prefer light-theme UI unless the article explicitly targets dark-theme behavior.
21-
- Export as PNG to preserve crisp text and UI accents. JPEGs are discouraged unless file size becomes an issue for photos.
22-
- Resize or compress only if the asset exceeds several megabytes; `pngquant` works well and keeps transparency intact.
23-
- Place the file in the matching doc-area subfolder and reference it with a relative path such as `/img/user-guide/<filename>.png`.
24-
- Large assets should be reviewed to ensure no dimensions explode to placeholder values (for example, some legacy `custom_*` assets show `167772160×671088640` metadata and should be replaced if touched).
2521

2622
## Tech stack
27-
- The documentation site is built with **Docusaurus 3** on top of **React 18** and MDX content. Styling extends the classic Docusaurus theme via custom CSS in `src/css/`.
23+
- The documentation site is built with **Docusaurus 3.x** on top of **React 18** and MDX content. Styling extends the classic Docusaurus theme via custom CSS in `src/css/`.
2824
- JavaScript tooling is managed with **Node.js** and npm. Install dependencies with `npm install` (Node 18+ recommended) and run the local preview with `npm run start`.
2925
- Search is powered by the `@easyops-cn/docusaurus-search-local` plugin; diagrams and math rendering use `remark-math`/`rehype-katex`.
3026

3127
## Other helpful notes
3228
- Follow Docusaurus front-matter conventions (`id`, `title`, `sidebar_label`, `description`) so pages appear in the correct sidebar.
3329
- Use MDX for interactive examples—React components live in `src/components/` and can be imported into docs when needed.
3430
- When reusing or adding React components from `src/components/`, prefer existing shared widgets (callouts, tabs, step-by-step helpers) before creating new ones, keep props well-documented in the component file, and ensure styles stay co-located in `src/css/custom.css` or the component's module CSS.
35-
- For contributor workflow: create descriptive branch names, run `npm run build` locally if you modify configuration or dependencies, and ensure linting/formatting stays consistent with Prettier defaults.
3631
- Deployment is handled by GitHub Actions, but manual deploys use `USE_SSH=true GIT_USER=<github-username> npm run deploy` as documented in `README.md`.
3732
- When embedding videos, copy them to `static/vid/` and reference them via HTML `<video>` tags in MDX rather than external hosts (keeps docs offline-friendly).

developer-guide/20-User interface/05-api-reference.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,19 @@ sidebar_class_name: sidebar-item--updated
1414
- File download endpoints return binary bodies; use the response content-type to handle them.
1515
- Path parameters are shown inline in the endpoint URL.
1616
- Request/response examples are the canonical shapes; omit optional fields you do not need.
17+
- Errors have the following schema:
18+
19+
```
20+
{
21+
"error": "Human-readable error message",
22+
"error_info": {
23+
"cause": "Human-readable cause (defaults to error if not set)",
24+
"remediation": "Suggested fix or next step",
25+
"status": integer,
26+
}
27+
}
28+
29+
```
1730

1831

1932
Use `/api/workers/...` for worker-only targets (experiment-scoped jobs/logs) and `/api/units/...` when the leader is also a valid target; both accept `$broadcast` where supported.

developer-guide/20-User interface/06-unit-api-reference.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,19 @@ sidebar_class_name: sidebar-item--updated
1212
- Poll `GET /unit_api/task_results/{task_id}` until `status` is `complete` or `failed`.
1313
- `$broadcast` may be used in path parameters where documented to target all units/workers.
1414
- File download endpoints return binary bodies; use the response content-type to handle them.
15+
- Errors have the following schema:
16+
17+
```
18+
{
19+
"error": "Human-readable error message",
20+
"error_info": {
21+
"cause": "Human-readable cause (defaults to error if not set)",
22+
"remediation": "Suggested fix or next step",
23+
"status": integer,
24+
}
25+
}
26+
27+
```
1528

1629

1730
## Health Check
397 KB
Loading
344 KB
Loading

user-guide/03-Extending your Pioreactor/02-Calibrations/08-hardware-calibrations.md

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,6 @@ slug: /hardware-calibrations
44
hide_table_of_contents: true
55
---
66

7-
import AssemblyInstructionBlock from '@site/src/components/AssemblyInstructionBlock';
8-
import Highlight from '@site/src/components/Highlight';
9-
import Admonition from '@theme/Admonition';
10-
11-
import * as colors from '@site/src/components/constants';
12-
13-
147
Hardware calibrations serve as a method to get accurate performance from your Pioreactor.
158

169

@@ -20,14 +13,21 @@ Hardware calibrations serve as a method to get accurate performance from your Pi
2013
This is optional, but can really help stirring performance. Creating a stirring calibration is also very easy, so we recommend it.
2114
:::
2215

23-
1. Start by filling a Pioreactor vial about 3/4th with water, and place the stirbar inside. Close with lid. Place into the Pioreactor.
24-
1. We'll perform this routine through your computer's command line. Need help [accessing it](/user-guide/accessing-raspberry-pi)?
25-
2. Enter **`ssh pioreactor@<insert unit name>.local`**.
26-
* For example, to calibrate on our Pioreactor named _worker3_, we typed **`ssh pioreactor@worker3.local`**.
27-
* The default password is `raspberry`.
28-
2. After SSHing into your Pioreactor, enter `pio calibrations run --device stirring`.
29-
4. The Pioreactor will increment the voltage applied to the motor, and record the RPM. After it's done, it will collect this data into a calibration curve, and store it locally.
30-
4. At the end, you'll be prompted to set this as the "active" calibration. Select "Yes".
16+
You'll need:
17+
18+
1. A vial
19+
2. A stir bar
20+
3. Liquid (water is fine)
21+
22+
![DC-based stirring calibration protocol in the Protocols page.](/img/user-guide/03-extending-your-pioreactor/08-hardware-calibrations/stirring-calibration-protocol.png)
23+
24+
1. In the **Protocols** page, choose your Pioreactor and select the **stirring** device.
25+
2. Click **Run protocol** for **DC-based stirring calibration**.
26+
3. Follow the on-screen flow:
27+
1. Insert a vial with a stir bar and the liquid volume you plan to use.
28+
2. Confirm stirring is off before starting.
29+
3. Let the protocol step through duty cycles while it records RPM.
30+
4. When the protocol finishes, save the calibration as active if prompted. Otherwise, set it active later from the **Calibrations** page.
3131

3232
You're done! Your stirring RPM should be much more responsive now.
3333

@@ -43,24 +43,24 @@ There are three pumps on the Pioreactor: media, alt-media, and waste. You don't
4343
2. An accurate weighing scale, with accuracy of 0.1g or better.
4444
3. Container of water
4545

46+
![Duration-based pump calibration protocol in the Protocols page.](/img/user-guide/03-extending-your-pioreactor/08-hardware-calibrations/pump-calibration-protocol.png)
47+
4648

4749
:::tip
4850
[Supplying external power](/user-guide/external-power)? Make sure to plug in your external power **before** pump calibration!
4951
:::
5052

5153

52-
<AssemblyInstructionBlock title="Calibrating the pumps" images={["experiments/turbidostat/ssh_into_unit.png","experiments/turbidostat/run_pump_calc.png"]}>
53-
54-
55-
1. We'll perform this routine through your computer's command line. Need help [accessing it](/user-guide/accessing-raspberry-pi)?
56-
2. Enter **`ssh pioreactor@<insert unit name>.local`**.
57-
* For example, to calibrate on our Pioreactor named _worker3_, we typed **`ssh pioreactor@worker3.local`**.
58-
* The default password is `raspberry`.
59-
3. To calibrate the `media_pump`, enter `pio calibrations run --device media_pump`. Likewise for `waste_pump` and `alt_media_pump.`
60-
4. Follow the prompts to calibrate your pump.
61-
4. At the end, you'll be prompted to set this as the "active" calibration. Select "Yes".
62-
63-
</AssemblyInstructionBlock>
54+
1. In the **Protocols** page, choose your Pioreactor and select the pump device you want to calibrate (for example `media_pump`, `waste_pump`, or `alt_media_pump`).
55+
2. Click **Run protocol** for **Duration-based pump calibration**.
56+
3. Follow the on-screen flow:
57+
1. Review the safety steps for keeping liquids away from the Pioreactor hardware.
58+
2. Name the calibration.
59+
3. Enter the target volumes to calibrate around (comma-separated values, in mL).
60+
4. Optionally adjust PWM settings.
61+
5. Place both tubing ends in the water container and prime the pump until the tubing is fully filled.
62+
6. For each dispense step, hold the outflow tube above your vial or graduated cylinder, run the pump for the prompted duration, and record the measured volume. Repeat until the protocol completes.
63+
4. When the protocol finishes, save the calibration as active if prompted. Otherwise, set it active later from the **Calibrations** page.
6464

6565
## Managing calibrations
6666

0 commit comments

Comments
 (0)