pro read_solar_spectrum,path1,wavnum,solar ;-------------------------------------------------- ; routine returns a measured solar spectrum. ; ; input: ; path1........path where the data file (Solar_spectrum.dat) exists ; ; output: ; wavnum......wavenumber, 1/cm ; solar.......solar intensity, W/m^2/cm-1 ; ; note: wavelength in microns is 10000/wavnum ; ; source: Mark Hervig ; ;-------------------------------------------------- ;- open the file ; path1 = '/home/mhervig/solar/' file = path1 + 'Solar_spectrum.dat' openr,lu,file,/get_lun ;- read the file head = ' ' readf,lu,head readf,lu,wn_st,wn_en,wn_del readf,lu,head nrec = long(wn_en - wn_st + 1) wavnum = fltarr(nrec) solar = fltarr(nrec) i = 0L while (not eof(lu)) do begin readf,lu,a,b wavnum(i) = a solar(i) = b i = i + 1L endwhile ;- done close,lu free_lun,lu return end