Calculates emittance based on butterfly image.