Commit 96913fc3 authored by Plaszczynski Stephane's avatar Plaszczynski Stephane
Browse files

extraction des chi2 individuels

parent 600c5941
BEGIN{
idx=0
}
/chi2=/ && !/constraint/{
print $0
varname=$2
var[idx]=varname
split($3,a,"=")
val=a[2]
varindex[varname]=idx
chi2[idx]=val
idx++
}
END{
#find min index
imin=100
imax=0
for (i in varindex){
j=varindex[i]
if (j < imin) imin=j
if (j > imax) imax=j
}
# print "min/max=",imin,imax
for (j=imin;j<=imax;j++){
printf("||%s",var[j])
}
printf("\n")
for (j=imin;j<=imax;j++){
printf("\t||%.1f",chi2[j])
}
printf("\n")
# for (var in varindex)
# printf("%d||%s||%f\n" ,varindex[var],var,chi2[var])
# printf("\n")
# for (i in chi2)
# printf("||%.2f||" ,chi2[i])
#printf("\n")
}
......@@ -61,8 +61,8 @@ if (n_elements(name2) ne 0) then begin &$
ibf=strindex(name2,name[i],/silent) &$
cgplot,[bf[ibf],bf[ibf]],!y.crange,/over,line=2 &$
endif &$
;cgtext,m-2*s,0.6,ss,/data,charsize=.5,col='blue' &$
al_legend,ss,/top,/right,box=0,textcol=blue,chars=0.6 &$
cgtext,m-2*s,0.6,ss,/data,charsize=.6,col='blue' &$
;al_legend,ss,/top,/right,box=0,textcol=blue,chars=0.6 &$
if (ibf ge 0) then begin&$
print,'||',name[i],'||',cgNumber_Formatter(bf[ibf],dec=3),'||',ss,'||' &$
endif else begin &$
......@@ -72,5 +72,5 @@ line=[line,strn(m)] &$
endfor
if (write ne 0) then closeplot,/pdf,/view
;if (write ne 0) then closeplot,/png
;if (write ne 0) then closeplot,/pdf,/view
if (write ne 0) then closeplot,/png
......@@ -29,7 +29,7 @@ name2=strtrim(hdr[5:n_elements(hdr)-4],2) &$
derived,t2,name2
if (n_elements(write) eq 0) then write=0
if (write ne 0) then openplot,fileout,xs=30,ys=30,charsize=1.5 else cgdisplay,900,700,tit=dir,/free
if (write ne 0) then openplot,"compmc2.ps",xs=30,ys=30,charsize=1.5 else cgdisplay,900,700,tit=dir,/free
if (write eq 0) then !p.thick=3 else !p.thick=8
if (write eq 0) then !p.charsize=1
......@@ -62,4 +62,5 @@ endfor
cgtext,0.3,ALIGNMENT=.5, CHARSIZE=.8,0.97,dir,col="dark green",/normal
cgtext,0.7,0.97,ALIGNMENT=.5, CHARSIZE=.8,dir2,col="dark red",/normal
if (write ne 0) then closeplot,/pdf,/view
;if (write ne 0) then closeplot,/pdf,/view
if (write ne 0) then closeplot,/png,/view
delvar,t
t1=mrdfits(dir+"/samples.fits",1,hdr)
......@@ -16,8 +14,6 @@ if (strcmp(in,'s') eq 1) then stop
burn_in=long(in)
print,burn_in
t=[t1[burn_in:*,*],t2[burn_in:*,*],t3[burn_in:*,*],t4[burn_in:*,*]]
help,t
sz=size(t1,/dim)
N=sz[1]-9 ; class
......@@ -27,13 +23,11 @@ N=sz[1]-1
autozone,N
cgdisplay,1200,800,/free,tit=dir
for i=1,N do begin &$
v=t1[burn_in:*,i] &$
hist_plot,v,/norm,bs=bs,tit=name[i]+'('+strn(i)+')',xticks=2 &$
v=t2[burn_in:*,i] &$
hist_plot,v,/norm,binsize=bs,/sup,col=red &$
v=t3[burn_in:*,i] &$
hist_plot,v,/norm,binsize=bs,/sup,col=blue &$
v=t4[burn_in:*,i] &$
hist_plot,v,/norm,binsize=bs,/sup,col=green &$
if (burn_in lt (size(t1))[1]) then hist_plot,t1[burn_in:*,i],/norm,bs=bs,tit=name[i]+'('+strn(i)+')' &$
if (burn_in lt (size(t2))[1]) then hist_plot,t2[burn_in:*,i],/norm,binsize=bs,/sup,col=red &$
if (burn_in lt (size(t3))[1]) then hist_plot,t3[burn_in:*,i],/norm,binsize=bs,/sup,col=blue &$
if (burn_in lt (size(t4))[1]) then hist_plot,t4[burn_in:*,i],/norm,binsize=bs,/sup,col=green &$
endfor
;t=[t1[burn_in:*,*],t2[burn_in:*,*],t3[burn_in:*,*],t4[burn_in:*,*]]
;help,t
......@@ -68,7 +68,7 @@ algo=ada
length=$NSAMPLES
proposal_cov=$cov
ts=10000
t0=200
t0=2000
scale=0.001
do_move=false
EOF
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment