Index: trunk/MagicSoft/Simulation/Detector/Starfield/star.cxx
===================================================================
--- trunk/MagicSoft/Simulation/Detector/Starfield/star.cxx	(revision 341)
+++ trunk/MagicSoft/Simulation/Detector/Starfield/star.cxx	(revision 342)
@@ -151,5 +151,5 @@
   bflux = pow(10.,-0.4*bmag-22.42);
   tprime = (nu2_Hz - nu1_Hz) / ( log(vflux/bflux) - 3. * log(nu1_Hz/nu2_Hz) );
-  if (verbose > 1) cout << "Tprime = " << tprime/1.38e-23*6.62e-34 << "\n";
+  if (verbose > 1) cout << "Blackbody T = " << tprime/1.38e-23*6.62e-34 << "\n";
      
      
@@ -215,8 +215,10 @@
 
   if( rmag < -100. ){ // rmag not present (it's not part of the catalog)
-  
+
+    temp = temp * 1.38e-23 / 6.62e-34;     // * k / h
+
     rflux = vflux * pow((VLMIN_nm + VLMAX_nm)/(RLMIN_nm + RLMAX_nm),3.) *
-      (exp(nu1_Hz/tprime) - 1.) /
-      (exp(LIGHTSPEED_mps/((RLMIN_nm+RLMAX_nm)/2.*1e-9)/tprime) - 1.);
+      (exp(nu1_Hz/temp) - 1.) /
+      (exp(LIGHTSPEED_mps/((RLMIN_nm+RLMAX_nm)/2.*1e-9)/temp) - 1.);
 
     rmag = (log10(rflux) + 22.42)/(-0.4);
