Process and considerations for running a chemostat.
def chemostat(eVOLVER, input_data, vials, elapsed_time):
OD_data = input_data['transformed']['od']
##### USER DEFINED VARIABLES #####
start_OD = [0] * 16 # ~OD600, set to 0 to start chemostate dilutions at any positive OD
start_time = [0] * 16 #hours, set 0 to start immediately
# Note that script uses AND logic, so both start time and start OD must be surpassed
OD_values_to_average = 6 # Number of values to calculate the OD average
chemostat_vials = vials #vials is all 16, can set to different range (ex. [0,1,2,3]) to only trigger tstat on those vials rate_config = [0.231] * 16 #to set all vials to the same value, creates 16-value list
stir = [8] * 16
#UNITS of 1/hr, NOT mL/hr, rate = flowrate/volume, so dilution rate ~ growth rate, set to 0 for unused vialsrate_config = [0.231,0.231,0.231,0.231,0.46,0.46,0.46,0.46,0.46,0.46,0.46,0.46,0.46,0.46,0.46,0.46]if eVOLVER.experiment_params is not None:
rate_config = list(map(lambda x: x['rate'], eVOLVER.experiment_params['vial_configuration']))
stir = list(map(lambda x: x['stir'], eVOLVER.experiment_params['vial_configuration']))s
start_time= list(map(lambda x: x['startTime'], eVOLVER.experiment_params['vial_configuration']))
start_OD= list(map(lambda x: x['startOD'], eVOLVER.experiment_params['vial_configuration']))#Tunable settings for bolus, etc. Unlikely to change between expts
bolus = 0.5 #mL, can be changed with great caution, 0.2 is absolute minimum
##### End of Chemostat Settings #####
flow_rate = eVOLVER.get_flow_rate() #read from calibration file
period_config = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] #initialize array
bolus_in_s = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] #initialize array