CosmoDM and its application to Pan-STARRS data. (24th June 2015)