Skip to content

Commit

Permalink
more oversampling with the new firmware
Browse files Browse the repository at this point in the history
  • Loading branch information
CamDavidsonPilon committed Feb 1, 2025
1 parent 3868227 commit b0663ef
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@


#### Enhancements
- new RP2040 firmware improvements => less noise in OD readings
- 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. This is useful for scripting purposes.
- A new CLI for pumps: `pio run pumps`. Add pumps as options:
Expand Down
2 changes: 1 addition & 1 deletion pioreactor/background_jobs/od_reading.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def __init__(
fake_data: bool = False,
dynamic_gain: bool = True,
penalizer: float = 0.0, # smoothing parameter between samples
oversampling_count: int = 32,
oversampling_count: int = 42,
) -> None:
super().__init__()
self.fake_data = fake_data
Expand Down
2 changes: 1 addition & 1 deletion pioreactor/calibrations/stirring_calibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def run_stirring_calibration(
max_dc + min_dc
) / 2 # we start with a somewhat low value, s.t. the stir bar is caught.
st.start_stirring()
sleep(8)
sleep(5)

for count, dc in enumerate(dcs, start=1):
st.set_duty_cycle(dc)
Expand Down
5 changes: 5 additions & 0 deletions pioreactor/structs.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,14 @@ def calibration_type(self):

def save_to_disk_for_device(self, device: str) -> str:
from pioreactor.calibrations import CALIBRATION_PATH
import shutil

calibration_dir = CALIBRATION_PATH / device
calibration_dir.mkdir(parents=True, exist_ok=True)

# Set ownership to pioreactor:www-data using shutil
shutil.chown(calibration_dir, user="pioreactor", group="www-data")

out_file = calibration_dir / f"{self.calibration_name}.yaml"

# Serialize to YAML
Expand Down

0 comments on commit b0663ef

Please sign in to comment.