scanner calib: fitting, gain calculation fixed