Safety treshold - dosing automation

Dear Pioreactor,

In some our experiments we are using larger vials (e.g., 60 mL) in Pioreactor 20 ml model and we would like to set the safety threshold higher than the hardcoded level. The safety threshold volume of the Pioreactors was used to be adjustable. At the current version however, it seems to hardcoded with a defined threshold based on the Pioreactor model (i.e., 20 mL or 40 mL).

    def MAX_VIAL_VOLUME_TO_STOP(cls) -> float:
        return 18.0 if is_20ml() else 38.0

Although, this makes sese, the current limits causes the dosing_automation to stop as the pre-defined threshold levels are already exceeded, which makes makes it difficult to run experiments with custom setups… Is it possible to provide alternative option(s) to enable safety threshold level customization?

Hi @sharknaro,

This is possible, yes, but it needs to be done in Python vs a config setting. Here’s how:

On each worker, add the following file to your ~/.pioreactor/plugins folder:

from pioreactor.background_jobs.dosing_automation import DosingAutomationJob

__plugin_name__ = "New max vial volume"
__plugin_summary__ = "Set max vial volume to 58ml."

DosingAutomationJob.MAX_VIAL_VOLUME_TO_STOP = 58

For example, you can create it with:

nano ~/.pioreactor/plugins/new_max_vial_volume.py

You should see the plugin in on the list in the Plugins UI page, and it should be active the next time you start a dosing-automation on that worker.


tip: If you add this to your leader’s ~/.pioreactor/plugins folder, you can run

pios cp ~/.pioreactor/plugins/new_max_vial_volume.py

to distribute it to all your workers automatically.