Skip to content

Commit

Permalink
fix calibration -y, better default pump cal from Mo's data
Browse files Browse the repository at this point in the history
  • Loading branch information
CamDavidsonPilon committed Jan 31, 2025
1 parent 7d53c6c commit 8d14982
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 13 deletions.
13 changes: 8 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#### Enhancements
- Improved chart colors in the UI
- The OD reading CLI has a new option, `--snapshot`, that will start the job, take a single reading, and exit.
- The OD reading CLI has a new option, `--snapshot`, that will start the job, take a single reading, and exit. This is useful for scripting purposes.
- A new CLI for pumps: `pio run pumps`. Add pumps as options:
```
pio run pumps --media 1 --waste 2
Expand All @@ -12,9 +12,11 @@
```
pio run pumps --waste 2 --media 1 --waste 2
```
- support for 40ml
- Run multiple experiment profiles per experiment.

- Initial support for 40ml
- Run multiple experiment profiles per experiment!
- Specify which Pioreactor to update on the Updates page (option is only available with release archives.)
- Choose the level of detail on the new Event Logs page.
- Added index to stirring_rates table.

#### Web API changes

Expand All @@ -38,7 +40,8 @@

#### Bug fixes
- fixed ui not showing 3p calibrations
- experiment profiles start now use the unit_api directly. I think this mitigates the huey workers stampeding on each other when try to start many jobs.
- experiment profiles start now use the unit_api directly. This may mitigate the issue where huey workers stampeding on each other when try to start many jobs.
- fix `pio calibrations run ... -y` not saving as active.

### 25.1.21

Expand Down
6 changes: 3 additions & 3 deletions pioreactor/actions/pump.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@
DEFAULT_PWM_CALIBRATION = structs.SimplePeristalticPumpCalibration(
calibrated_on_pioreactor_unit=get_unit_name(),
created_at=default_datetime_for_pioreactor(),
hz=200.0,
dc=100.0,
hz=250.0,
dc=95.0,
voltage=-1,
calibration_name="default_pump_calibration",
curve_type="poly",
curve_data_=[1.0, 0.0],
curve_data_=[0.0911, 0.0], # 0.0911 is a pretty okay estimate for the slope of the calibration curve
recorded_data={"x": [], "y": []},
)

Expand Down
4 changes: 2 additions & 2 deletions pioreactor/calibrations/stirring_calibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ def run_stirring_calibration(

# go up and down to observe any hysteresis.
dcs = (
list(range(round(max_dc), round(min_dc) - 3, -3))
list(range(round(max_dc), round(min_dc) - 2, -3))
+ list(range(round(min_dc), round(max_dc) + 3, 3))
+ list(range(round(max_dc), round(min_dc) - 3, -3))
+ list(range(round(max_dc), round(min_dc) - 2, -3))
)
n_samples = len(dcs)

Expand Down
2 changes: 2 additions & 0 deletions pioreactor/cli/calibrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ def run_calibration(ctx, device: str, protocol_name: str | None, y: bool) -> Non
click.echo(
f"Okay. You can use 'pio calibration set-active --device {device} --name {calibration_struct.calibration_name}' to set this calibration as the active one."
)
else:
calibration_struct.set_as_active_calibration_for_device(device)

click.echo(
f"Calibration '{calibration_struct.calibration_name}' of device '{device}' saved to {out_file} ✅"
Expand Down
6 changes: 3 additions & 3 deletions pioreactor/cli/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ def run() -> None:
for plugin in plugin_management.get_plugins().values():
for possible_entry_point in dir(plugin.module):
if possible_entry_point.startswith("click_"):
print(
"The `click` API is deprecated and will stop working in the future. You should update your plugins."
)
# print(
# "The `click` API is deprecated and will stop working in the future. You should update your plugins."
# )
run.add_command(getattr(plugin.module, possible_entry_point))

if am_I_leader():
Expand Down

0 comments on commit 8d14982

Please sign in to comment.