   thrust::device_vector<float> dLambdas(BS * NY * NX);
   thrust::device_vector<float> dExpLambdas(NY * NX);
   thrust::device_vector<float> dLogLs(NY * NX);
-  thrust::device_vector<float> dIntensity(BS * 24 * 32 * 32);
-  thrust::host_vector<float> hIntensity(BS * 24 * 32 * 32);
-  thrust::device_vector<float> dIntensity2(BS * 24 * 32 * 32);
-  thrust::host_vector<float> hIntensity2(BS * 24 * 32 * 32);
+  thrust::device_vector<float> dIntensity(BS * 3 * 48 * 32 * 32);
+  thrust::host_vector<float> hIntensity(BS * 3 * 48 * 32 * 32);
+  thrust::device_vector<float> dIntensity2(BS * 3 * 48 * 32 * 32);
+  thrust::host_vector<float> hIntensity2(BS * 3 * 48 * 32 * 32);
   thrust::device_vector<int> dpsum(BS);
   thrust::device_vector<float> dlsum(BS);
   thrust::host_vector<long long> hPhc(BS * 3);

	}
      
//      if (psum - lsum < 2500) continue;
      dim3 grid(24, 1, imgcount);
      dim3 block(22, 22, 1);

      int base = (grid.y * block.y * grid.x * block.x * block.z);

  int zval = threadIdx.z + blockIdx.z * blockDim.z;
  likelihood likelihooder = getObjects(myspherer, threadIdx.x, threadIdx.y, zval, blockIdx.x, blockIdx.y, lsum, psum, phc);
  float likelihood1 = -1e30f;
  if (likelihooder.factor > 1e-17)
  {
  likelihood1 = thrust::reduce(thrust::seq,
				   thrust::make_transform_iterator(thrust::make_counting_iterator(0), likelihooder),
