Analysis code for LQ3