zgyin的个人博客分享 http://blog.sciencenet.cn/u/zgyin

博文

X,Y坐标轴都存在误差的数据处理方法

已有 6096 次阅读 2012-9-16 22:31 |个人分类:idl使用方法|系统分类:科研笔记

pro zhang
READCOL,'E:test.dat',F='F,F,F,F',x, y, C, D
FITEXY, x, y, A, B, X_SIG= C, Y_SIG= D, sigma_A_B, chi_sq, q
print,'Intercept=',A
print,'Slope=',B
print,'Intercept standard deviation=',sigma_A_B[0]
print,'Slope standard deviation=',sigma_A_B[1]
print,'Chi_sq=',chi_sq
print,'q - chi-sq probability=',q
end
天文软件包里面有个程序FITEXY,用于处理X,Y都存在误差时候的线性拟合,并且给出了一系列的参数


仅仅Y轴存在误差建议采用下面的程序
result=linfit(x,y,MEASURE_ERRORS=Yerror,/DOUBLE,SIGMA=variable)
result[0]存放的是截距,result[1]存放的是斜率

linfit是idl自带的程序


带权重的线性拟合建议采用下面的程序

SIXLIN, x, y, a, siga, b, sigb, WEIGHT = Weights



https://wap.sciencenet.cn/blog-783377-613435.html

上一篇:两个有用的天文数据库
下一篇:IDL linux版本安装方法
收藏 IP: 202.101.72.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-4-24 09:41

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部