Code for a CAGEO paper