当前位置: 首页>>代码示例>>Python>>正文


Python Analysis.makeLSQspline方法代码示例

本文整理汇总了Python中Analysis.makeLSQspline方法的典型用法代码示例。如果您正苦于以下问题:Python Analysis.makeLSQspline方法的具体用法?Python Analysis.makeLSQspline怎么用?Python Analysis.makeLSQspline使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Analysis的用法示例。


在下文中一共展示了Analysis.makeLSQspline方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: mean

# 需要导入模块: import Analysis [as 别名]
# 或者: from Analysis import makeLSQspline [as 别名]
 print mean(sqrt(diffxs**2 + diffys**2)) 
 
 if opts.map2:
     xds, yds = mapping2(goodxs, goodys)
     goodxs += xds/opts.pxsize
     goodys += yds/opts.pxsize
     diffxs = (xls[sel] - goodxs) * opts.pxsize
     diffys = (yls[sel] - goodys) * opts.pxsize
 
     print "In the second round, those colocalized at an error of",
     print mean(sqrt(diffxs**2 + diffys**2)) 
 else:
     if opts.save_map2 \
         or raw_input('Save Second Pass? y/[n]').lower()[0] == 'y':
         Analysis.makeLSQspline(diffxs, diffys, goodxs, goodys, 
                                 savefile= 'offsets'+os.path.basename(fname),
                                 n = floor(max(2,sqrt(len(goodys)/10))))
 if len(goodxs):
     goodxf = [goodxs[0]]
     goodyf = [goodys[0]]
     diffxf = [diffxs[0]]
     diffyf = [diffys[0]]
     
     
     print "Selecting low density..."
     
     for goodx, goody, diffx, diffy in zip(goodxs, goodys, diffxs, diffys):
         if min(sqrt((goodx - array(goodxf))**2 + (goody - array(goodyf))**2)) > opts.quiv_dist:
             goodxf.append(goodx)
             goodyf.append(goody)
             diffxf.append(diffx)
开发者ID:petercombs,项目名称:YildizLabCode,代码行数:33,代码来源:CombineMatlabSpots.py

示例2: IPShellEmbed

# 需要导入模块: import Analysis [as 别名]
# 或者: from Analysis import makeLSQspline [as 别名]
        else:
            xl = xld[sel]
            yl = yld[sel]
            xr = xrd[sel]
            yr = yrd[sel]

        if opts.interact:
            from IPython.Shell import IPShellEmbed

            ipshell = IPShellEmbed([], banner="\a\a\aEntering Interpreter")
            print "\a\a\a"
            ipshell()

        ##############################  Make the Spline #######################
        # 		print "Splining!"
        mapping = Analysis.makeLSQspline(xl, yl, xr, yr, n=opts.n, savefile=fname + "_1", multi=opts.multi)

        ##############################  Evaluate spline quality ###############
        # 		print "applying on all good data"
        xn, yn = mapping(xrd[sel], yrd[sel])
        diffx = xld[sel] - xn
        diffy = yld[sel] - yn
        diffmag = sqrt(diffx ** 2 + diffy ** 2)
        diffmags = sorted(diffmag)
        print "Median: ", median(diffmag), "1%", diffmags[int(0.01 * len(diffmags))], "5%", diffmags[
            int(0.05 * len(diffmags))
        ], "10%", diffmags[int(0.10 * len(diffmags))], "20%", diffmags[int(0.20 * len(diffmags))], "30%", diffmags[
            int(0.30 * len(diffmags))
        ], "40%", diffmags[
            int(0.40 * len(diffmags))
        ], "60%", diffmags[
开发者ID:rflrob,项目名称:YildizLabCode,代码行数:33,代码来源:Postprocessing.py


注:本文中的Analysis.makeLSQspline方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。