Julian's python code for experimental control