pro tg2vbmv,filin,logt,logg,vabs,bmv,bc ; this routine uses routines starmass.pro and bmv_fillin to provide ; estimates of B-V and V absolute magnitude on a regularly sampled ; grid of log(Teff) and log(g). ; On input, filin contains the path to a basel colors file, ; and logt, logg are vectors containing the desired coordinate grids. ; On output, vabs(nt,ng), bmv(nt,ng), and bc(nt,ng) are arrays ; containing V absolute mag, B-V, and the bolometric correction bc. ; constants logtsun=alog10(5777.) vabsun=4.83 loggsun=4.438 bcsun=-.123 ; make coordinate arrays nt=n_elements(logt) ng=n_elements(logg) llt=rebin(logt,nt,ng) llg=rebin(reform(logg,1,ng),nt,ng) bmv_fillin,filin,logt,logg,bmv,bc ; get B-V and BC logmass=fltarr(nt,ng) for i=0,nt-1 do begin for j=0,ng-1 do begin starmass,logt(i),logg(j),logm logmass(i,j)=logm endfor endfor ; vabs=-2.5*log(lum)-BC, log(lum)=4(logT-logT_sun)+2logR ; and 2logR = logM - logg logr2=logmass-llg+loggsun loglum=4.*(llt-logtsun)+logr2 vabs=-2.5*loglum-bc+bcsun+vabsun stop end