Implementation of paper "Coupled Quasi-harmonic Bases"