pro rd_nord,ra,dec,hd,vmag,bmv,logteff,abun ; This routine reads the file /local/d/timbrown/stardat/nordstrom.txt and ; returns arrays containing the indicated information for all stars for which ; complete data are available. ; ra, dec = J2000.0 ; hd = HD number ; vmag, bmv = V, B-V ; logteff = log(teff) ; abun = log(Z) ; open file, count the lines filin='/home/LCO/tbrown/d/stardat/nordstrom.txt' ;filin='/knobos/d/timbrown/stardat/nordstrom.txt' openr,iun,filin,/get_lun ss='' nn=0 while(not eof(iun)) do begin readf,iun,ss nn=nn+1 endwhile point_lun,iun,0 ; make the output arrays ra=dblarr(nn) dec=dblarr(nn) hd=lonarr(nn) vmag=fltarr(nn) bmv=fltarr(nn) logteff=fltarr(nn) abun=fltarr(nn) ; read the data jj=0 for i=0,nn-1 do begin readf,iun,ss len=strlen(ss) if(len gt 160) then begin strput,ss,' ',95 words=get_words(ss,nw) if(nw eq 20) then begin hd(jj)=long(words(6)) vmag(jj)=float(words(13)) bmv(jj)=float(words(14)) logteff(jj)=float(words(15)) abun(jj)=float(words(16)) hh=fix(words(7)) mm=fix(words(8)) sc=float(words(9)) ra(jj)=15.*(hh+mm/60.+sc/3600.) d9=words(10) sgn=strmid(d9,0,1) ds=strmid(d9,1,2) dd=fix(ds) mm=fix(words(11)) sc=float(words(12)) dec(jj)=float(dd)+mm/60.+sc/3600. if(sgn eq '-') then dec(jj)=-dec(jj) jj=jj+1 endif endif endfor ; truncate arrays for incomplete lines if necessary ra=ra(0:jj-1) dec=dec(0:jj-1) hd=hd(0:jj-1) vmag=vmag(0:jj-1) bmv=bmv(0:jj-1) logteff=logteff(0:jj-1) abun=abun(0:jj-1) close,iun free_lun,iun end