code for whisker analysis