 __host__ __device__ likelihood(idealsphere& spherer, float factor) : spherer(spherer), factor(factor) {}
 
   __host__ __device__ float getIntensity(const int& data) {
-  	float intensity = spherer(data) * factor + spherer.dLambdas[data] * spherer.lfactor;
+  	float lbase = spherer.dLambdas[data] * spherer.lfactor;
+	lbase += spherer.ebase;
+	if (lbase < 2e-3) lbase = 2e-3;
+  	float intensity = spherer(data) * factor + lbase;
 
 	return intensity;
   }

    int rawx = data % NX;
    int rawy = data / NX;

    /*if (rawx < 211) rawx += 37;
    if (rawy < 219) rawy += 11;*/
//    if (rawx < 233 - extrax * 3) rawx += /*29*/ -18 + extrax * 3;

intens[idx] = 0;*/
intensityfactor = 1e-13;
}
  intensityfactor *= pow(1.02, by - 0 * 0.5);
  likelihood likelihooder(myspherer, intensityfactor);

  return likelihooder;
