void F_get_photons(double time, double LAMBDA, double RADIANCE, double PIX_A, double *phot); void F_get_photons(double t, double LAMBDA, double RADIANCE, double PIX_A, double *phot) { /*double j; double pi=3.141592; // PI the famous number double h=6.63e-34; // Planck constant Js double c=3.00e8; // c speed of light m/s double f=8; // f, f-number of the illumination system //double phot; double a; //area of the pixel printf("Lambda: %.10f ->",LAMBDA); LAMBDA = LAMBDA*1e-9; // from nm to m printf("%.10f \n",LAMBDA); printf("Texp: %.10f ->",t); t=t*1e-9; //from ns to s printf("%.10f \n",t); printf("Area: %.10f ->",PIX_A); a=PIX_A*1e-12; // from um^2 to m^2 printf("%.15f \n",a); j=pi*RADIANCE/(1+(2*f)*(2*f)); //irradiance printf("Radiance %.15f \n",j); phot=j*a*t*LAMBDA/(h*c); //number of photons */ //double phot; phot =5; printf("photon %f \n",phot); //return phot; } double phot; F_get_photons(54000000.0, 525.0, 0.381 ,7.4*7.4,&phot); printf("Photons2: %f \n",phot);