Ray finding and calibration