Ignore:
Timestamp:
01/21/00 16:36:48 (25 years ago)
Author:
petry
Message:
Changed calculation of the R magnitude to use the temperature
derived from B-V rather than that assuming a black body.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Simulation/Detector/Starfield/star.cxx

    r341 r342  
    151151  bflux = pow(10.,-0.4*bmag-22.42);
    152152  tprime = (nu2_Hz - nu1_Hz) / ( log(vflux/bflux) - 3. * log(nu1_Hz/nu2_Hz) );
    153   if (verbose > 1) cout << "Tprime = " << tprime/1.38e-23*6.62e-34 << "\n";
     153  if (verbose > 1) cout << "Blackbody T = " << tprime/1.38e-23*6.62e-34 << "\n";
    154154     
    155155     
     
    215215
    216216  if( rmag < -100. ){ // rmag not present (it's not part of the catalog)
    217  
     217
     218    temp = temp * 1.38e-23 / 6.62e-34;     // * k / h
     219
    218220    rflux = vflux * pow((VLMIN_nm + VLMAX_nm)/(RLMIN_nm + RLMAX_nm),3.) *
    219       (exp(nu1_Hz/tprime) - 1.) /
    220       (exp(LIGHTSPEED_mps/((RLMIN_nm+RLMAX_nm)/2.*1e-9)/tprime) - 1.);
     221      (exp(nu1_Hz/temp) - 1.) /
     222      (exp(LIGHTSPEED_mps/((RLMIN_nm+RLMAX_nm)/2.*1e-9)/temp) - 1.);
    221223
    222224    rmag = (log10(rflux) + 22.42)/(-0.4);
Note: See TracChangeset for help on using the changeset viewer.