 };
 
 
-__global__ void computeintensity(float* target, idealsphere myspherer, float psum, float lsum)
+__global__ void computeintensity(float* target, float* intens, idealsphere myspherer, float psum, float lsum)
 {
   myspherer.r = exp(myspherer.roffset + (threadIdx.z + blockIdx.z * blockDim.z) * myspherer.rfactor);
   myspherer.offsetx = (threadIdx.x + blockIdx.x * blockDim.x) + myspherer.baseoffsetx;

  thrust::device_vector<float> dLambdas(NY * NX);
  thrust::device_vector<float> dIntensity(50 * 300 * 1200);
  thrust::host_vector<float> hIntensity(50 * 300 * 1200);

  idealsphere spherer(dPhotons, dLambdas);


				   thrust::make_transform_iterator(thrust::make_counting_iterator(0), likelihooder),
				   thrust::make_transform_iterator(thrust::make_counting_iterator(NY * NX), likelihooder));
  target[idx] = likelihood;
  intens[idx] = intensityfactor;
}

int main()
