 	{
 		maxval = hIntensity[k];
 		maxint = hIntensity2[k];
-<		maxidx = k;
+		maxidx = k;
 	}
 	if (hIntensity[k] < minval) minval = hIntensity[k];
 }

intens[idx] = 0;*/
intensityfactor = 1e-13;
}
  //intensityfactor *= pow(1.01, myspherer.tid - 128 * 0.5);
  likelihood likelihooder(myspherer, intensityfactor);

  return likelihooder;

	}
      
//      if (psum - lsum < 2500) continue;
      dim3 grid(1, 1, 2700);
      dim3 block(32, 32, 1);

      spherer.rfactor = 0.0025;
      spherer.roffset = -10;
      spherer.baseoffsetx = NX / 2 - 10 - 15 - 0.5; // good val -10
      spherer.baseoffsety = NY / 2 + 10 - 11 - 0.5; // good val +10
      dPhotons.assign(photonVals.data(), photonVals.data() + NY * NX);
      dLambdas.assign(lambdaVals.data(), lambdaVals.data() + NY * NX);
