Regarding ODset in Turbidostat

There exists various lines in the Turbidostat section of custom_script such as

text_file.write("{0},{1}\n".format(elapsed_time, lower_thresh[x]))
and
text_file.write("{0},{1}\n".format(elapsed_time, upper_thresh[x]))

What is the purpose of recalibrating the Turbidostat every time? Why are those values chosen? Why doesn’t the Chemostat contain similar lines?

Thank you and I apologize in advance if there is some trivial explanation to this.

These lines are logging/saving whether the turbidostat algorithm is targeting the upper or lower OD between loop iterations and for post data processing. Basically should the algorithm wait for the OD to reach the upper T-stat limit, or should it be trying to hit the lower threshold. If the OD goes over the ODset value, it assigns the lower limit to ODSet and triggers a dilution event. Then it checks whether the dilution was successful in getting the OD to the lower limit. If it was, it assigns the upper limit again to ODSet and waits for the OD to increase. It’s possible that a dilution does not get the OD below the lower limit, and in this case you would not change the OD set to the upper limit so that another dilution can happen in a few minutes.

The chemostat algorithm isn’t trying to hit a specific OD, so it doesn’t have to keep track of a target.

Hopefully that is clear. We don’t really need to save the ODSet variable to file, but it can be useful potentially in debugging to know what the t-stat algorithm was trying to do.

1 Like

That is clear. Thank you.