Em sábado, 18 de abril de 2015 11:15:18 UTC-3, alep...@gmail.com escreveu:
> Make a chart of ' distance x speed
> 2- Make a linear fit and compare with robust tuning ( comment )
> 3- Determine the correlation coefficients ( Pearson, Spearman and Kendall ) and comment
> 4- Use the bootstrap technique to determine H0 ( km / s / Mpc ) . Making the histogram of values
> obtained. Set a Gaussian and give the value of H0 with uncertainty.
> 5- Take an error of 5 % in the variables . Use boot_xyfit.pro program. Make a histogram
> for the given values . Compare the average value with the value obtained by robust adjustment .
> 6 Assuming the uncertainty in the Y variable, do residue analysis. Display the graph. Is there any solution available ?
home='C:\Users\Cliente02\.idl\itt\projetos\'
;hubble=rd_tfile('teste.rtf',/auto,/convert)
openr,1,home+'distancia1.txt'
dados=fltarr(2,24)
readf,1,dados
close,1
openr,1,home+'velocidade1.txt'
luz=fltarr(1,24)
readf,1,luz
close,1
openr,1,home+'erro1.txt'
erros=fltarr(1,24)
readf,1,erros
close,1
redshift=dados(0,*)
velocidade=luz(0,*)
erroy=erros(0,*)
plot,redshift,velocidade,psym=2,xrange=[0.0,2.5],yrange=[-50 0.0,1500.0],$
xtit='Distancia(10E6)',ytit='Velocidade (km/s)',charsize=1.0,xminor=11,yminor=11
oploterror,redshift,velocidade,erroy,psym=3,errcolor=fsc_col or('red')
plots,2.2,1350,psym=2,symsize=1.
redshift2=[0.0,2.5]
xyouts,2.22,1350,'Amostras',charsize=1.
xyouts,2.22,1250,'Aj.Linear',charsize=1.,color=fsc_color('re d')
xyouts,2.22,1150,'Aj.Robusto',charsize=1.,color=fsc_color('g reen')
result=LINFIT(distancia,velocidade)
print,result
yfit=result(0)+result(1)*redshift2
oplot,redshift2,yfit,linestyle=3,color=fsc_color('red')
robusto=robust_linefit(redshift,velocidade,/bisect,NumIT = 1000)
yrob=robusto(0)+robusto(1)*redshift2
oplot,redshift2,yrob,linestyle=2,color=fsc_color('green')
end
Can someone tell me Why NOT appears as lines ?
|