Helper code from the Deisseroth Lab at Stanford University