Fix bug in calculation of beams_per_pixel