dustem_read_tls.pro
904 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
;DP
FUNCTION dustem_read_tls,dir_in,file,silent=silent
st=''
Nmax=10000L
sts=strarr(Nmax)
openr,unit,dir_in+'data/'+file,/get_lun
;==read comments
str1='' & first_char='#'
str2=''
str3=''
WHILE first_char EQ '#' DO BEGIN
readf,unit,str1
readf,unit,str2
readf,unit,str3
first_char=strmid(str1,0,1)
ENDWHILE
stv1=str_sep(strtrim(strcompress(str1),2),' ')
a_dtls=float(stv1(0))
lc=float(stv1(1))
c_delta=float(stv1(2))
stv2=str_sep(strtrim(strcompress(str2),2),' ')
vt=float(stv2(0))
Pmu=float(stv2(1))
gamma_e=float(stv2(2))
stv3=str_sep(strtrim(strcompress(str3),2),' ')
omega_m=float(stv3(0))
tau_0=float(stv3(1))
V0=float(stv3(2))
Vmin=float(stv3(3))
Vm=float(stv3(4))
readf,unit,ldtresh
full_st={file:file,vt:vt,lc:lc,a_dtls:a_dtls,Pmu:Pmu,gamma_e:gamma_e, omega_m:omega_m,c_delta:c_delta,tau_0:tau_0,V0:V0,Vmin:Vmin,Vm:Vm,ldtresh:ldtresh}
close,unit
free_lun,unit
cd
return,full_st
END