Wrap Javad's change of basis code.