Python codes for photospot