Setting Different Temperatures Across Smart Sleeve Array

Question from User:

eVOLVER wouldn’t adjust the temperature to 33C even when I changed it in custom_script. I had to manually change it to set different temperatures.

Brief Response:
Generally, the temperature gets updated based on what is written on the temp_config files (in the same file directory structure as the OD and temp data). The script interprets the last value that was written there and updates the vials accordingly. If for whatever reasons there are issues with temperature updates, first thing to check is if the temp_config file is properly updated after the first measurement or two (might take one measurement cycle to update).

in More Detail:

The temperatures initially get written in the config file with this code block (from This code segment basically takes whatever values you enter in custom script and writes them into temp_config:

        if (len(temp_config) is 2): #set temp at the beginning of the experiment, can clone for subsequent temp changes
                if np.isscalar(temp_input):
                    temp_val = temp_input
                    temp_val = temp_input[x]

                text_file = open(tempconfig_path,"a+")
                text_file.write("{0},{1}\n".format(elapsed_time, temp_val))

Consequently, another segment of code (in updates the eVOLVER with the appropriate changes:

    temps = []
    for x in vials:
        file_path =  "{0}/{1}/temp_config/vial{2}_tempconfig.txt".format(save_path,exp_name,x)
        temp_set_data = np.genfromtxt(file_path, delimiter=',')
        temp_set = temp_set_data[len(temp_set_data)-1][1]
        temp_set = int((temp_set - temp_cal[1][x])/temp_cal[0][x])

            temp_data[x] = (float(temp_data[x]) * temp_cal[0][x]) + temp_cal[1][x]
        except ValueError:
            print("Temp Read Error")

If the value is different than what it was in the past, then update the evolver again.

    if not temps == current_temps:
        MESSAGE = list(temps)
        command = {'param':'temp', 'message':MESSAGE}
        dpu_evolver_ns.emit('command', command, namespace='/dpu-evolver')
        current_temps = temps

Hope this helps. Please let me know if this solves the issues.

Adding to this, the code at the moment does not write to temp_config every iteration - it only will write to it at the start. You should modify to write out to temp_config as shown above when you want to change the temperature mid experiment.@bgwong, let’s talk about simplifying this - I think it makes more sense to have a call out to the eVOLVER_module to handle all the logic around temperature changing/logging. The files shouldn’t really be getting modified or looked at in I think a similar thing happens for OD_set. I’ll add some issues on github.

1 Like

Thanks for the response. I’ll check this when I start the next experiment. The problem was that even when I modified the temperature in before starting the experiment it didn’t update the temperature for some reason.