Added pet calculation. 

Closes #293 

@paglias Thanks for your help on this. How does this look to you? Fixes the issue without changing any files on the main repo.