Code associated with Yeatman, Wandell, Mezer, 2014, Nature Communications