Implemented Justin's perturbpure function for perturbCPT