Complete the calulation of photometric discrepancy

Complete the calulation of photometric discrepancy