Added function to Pspec module.