本文整理汇总了Python中Analysis.fit2d方法的典型用法代码示例。如果您正苦于以下问题:Python Analysis.fit2d方法的具体用法?Python Analysis.fit2d怎么用?Python Analysis.fit2d使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Analysis
的用法示例。
在下文中一共展示了Analysis.fit2d方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: quasi_airy
# 需要导入模块: import Analysis [as 别名]
# 或者: from Analysis import fit2d [as 别名]
def quasi_airy(center_x, center_y, width_x, width_y, offset, height):
def quairy_func(x,y):
R = sqrt((x - center_x)**2/width_x + (y - center_y)**2 / width_y)
return offset + height * jn(1, R)/(R+1e-6)
return quairy_func
if __name__ == '__main__':
funcs = {"Quasi-Airy": quasi_airy, "Gaussian": Analysis.gaussian, \
"Airy" : Analysis.airy, "Bessel", bessel}
rmses = {}
for i in funcs.keys():
rmses[i] = 0
try:
os.uname()
dirname = '/Users/pcombs/Documents/RotationData/2009-12-08-FITS/*'
bgname = '/Users/pcombs/Documents/RotationData/2009-12-08/MED_2009-12-08.fits'
except AttributeError:
dirname = r'C:\Documents and Settings\admin\Desktop\Peter\2009-12-09-FITS/8*'
bgname = r'C:\Documents and Settings\admin\Desktop\Peter\MED_2009-12-08.fits'
filelist = glob(dirname)
filelist = [os.path.join(dirname, f) for f in filelist]
filelist = filelist
for func_name in funcs.keys():
fit = Analysis.fit2d(xs, ys, data, fcn = funcs[func_name])