Script for joint angle analysis