Metrics in structural dynamics, python scripting