dustem_read_pol.pro 533 Bytes
;VG
FUNCTION dustem_read_pol,dir_in,file,silent=silent

st=''
Nmax=10000L
sts=strarr(Nmax)
openr,unit,dir_in+'data/'+file,/get_lun

;==read comments
str='' & first_char='#'
WHILE first_char EQ '#' DO BEGIN
  readf,unit,str
  first_char=strmid(str,0,1)
ENDWHILE

stv=str_sep(strtrim(strcompress(str),2),' ')
atresh=float(stv(0))
pstiff=float(stv(1))
plev=float(stv(2))
readf,unit,cteta0
readf,unit,npol

full_st={file:file,atresh:atresh,pstiff:pstiff,plev:plev,cteta0:cteta0,npol:npol}

close,unit
free_lun,unit

return,full_st

END