New analysis script; run from terminal