• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python pipe.write函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中nmrglue.fileio.pipe.write函数的典型用法代码示例。如果您正苦于以下问题:Python write函数的具体用法?Python write怎么用?Python write使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1:

#! /usr/bin/env python
""" Create files for ls unit test """

import nmrglue.fileio.pipe as pipe
import nmrglue.process.pipe_proc as p

d, a = pipe.read("time_complex.fid")
d, a = p.ls(d, a, ls=2.0, sw=True)
pipe.write("ls1.glue", d, a, overwrite=True)

d, a = pipe.read("time_complex.fid")
d, a = p.ls(d, a, ls=-3.0, sw=True)
pipe.write("ls2.glue", d, a, overwrite=True)

# freq domain
d, a = pipe.read("freq_real.ft2")
d, a = p.ls(d, a, ls=2.0, sw=True)
pipe.write("ls3.glue", d, a, overwrite=True)

d, a = pipe.read("freq_real.ft2")
d, a = p.ls(d, a, ls=17.0, sw=True)
pipe.write("ls4.glue", d, a, overwrite=True)

d, a = pipe.read("freq_real.ft2")
d, a = p.ls(d, a, ls=-5.0, sw=True)
pipe.write("ls5.glue", d, a, overwrite=True)
开发者ID:Tyf0n,项目名称:nmrglue,代码行数:26,代码来源:ls.py


示例2:

#! /usr/bin/env python
""" tests for MIR function """

import nmrglue.fileio.pipe as pipe
import nmrglue.process.pipe_proc as p

d, a = pipe.read("time_complex.fid")
d, a = p.mir(d, a, mode="left", sw=True)
pipe.write("mir1.glue", d, a, overwrite=True)

d, a = pipe.read("time_complex.fid")
d, a = p.mir(d, a, mode="right", sw=True)
pipe.write("mir2.glue", d, a, overwrite=True)

d, a = pipe.read("time_complex.fid")
d, a = p.mir(d, a, mode="right", invr=True, sw=True)
pipe.write("mir3.glue", d, a, overwrite=True)

d, a = pipe.read("time_complex.fid")
d, a = p.mir(d, a, mode="left", invr=True, sw=True)
pipe.write("mir4.glue", d, a, overwrite=True)

d, a = pipe.read("time_complex.fid")
d, a = p.mir(d, a, mode="center", sw=True)
pipe.write("mir5.glue", d, a, overwrite=True)

d, a = pipe.read("time_complex.fid")
d, a = p.mir(d, a, mode="ps90-180", sw=True)
pipe.write("mir6.glue", d, a, overwrite=True)

d, a = pipe.read("time_complex.fid")
开发者ID:Tyf0n,项目名称:nmrglue,代码行数:31,代码来源:mir.py


示例3: check_call

#! /usr/bin/env python
""" Create files for tp unit test """

from subprocess import check_call
import os

import nmrglue.fileio.pipe as pipe
import nmrglue.process.pipe_proc as p

d, a = pipe.read("time_complex.fid")
d, a = p.tp(d, a, auto=True)
pipe.write("tp1.glue", d, a, overwrite=True)

d, a = pipe.read("time_complex.fid")
d, a = p.tp(d, a, hyper=True)
pipe.write("tp2.glue", d, a, overwrite=True)

d, a = pipe.read("time_complex.fid")
d, a = p.tp(d, a, nohyper=True)
pipe.write("tp3.glue", d, a, overwrite=True)


pipe_command = """\
/bin/csh -c 'nmrPipe -in ./time_complex.fid                \
| nmrPipe  -fn FT  -auto \
-ov -out time-freq.c.ft1'"""
check_call(pipe_command, shell=True)

d, a = pipe.read("time-freq.c.ft1")
d, a = p.tp(d, a, hyper=True)
pipe.write("tp4.glue", d, a, overwrite=True)
开发者ID:edward-dauvergne,项目名称:nmrglue,代码行数:31,代码来源:tp.py


示例4:

#! /usr/bin/env python

import nmrglue.fileio.pipe as pipe
import nmrglue.process.pipe_proc as p

d,a = pipe.read("time_complex.fid")
d,a = p.cbf(d,a)
pipe.write("cbf1.glue",d,a,overwrite=True)

d,a = pipe.read("time_complex.fid")
d,a = p.cbf(d,a,last=30)
pipe.write("cbf2.glue",d,a,overwrite=True)

d,a = pipe.read("time_complex.fid")
d,a = p.cbf(d,a,reg=slice(1,100))
pipe.write("cbf3.glue",d,a,overwrite=True)

d,a = pipe.read("time_complex.fid")
d,a = p.cbf(d,a,slice=slice(9,20))
pipe.write("cbf4.glue",d,a,overwrite=True)
开发者ID:rpbarnes,项目名称:nmrglue,代码行数:20,代码来源:cbf.py


示例5:

#! /usr/bin/env python
""" Create files for integ unit test """

import nmrglue.fileio.pipe as pipe
import nmrglue.process.pipe_proc as p

d, a = pipe.read("time_complex.fid")
d, a = p.integ(d, a)
pipe.write("integ1.glue", d, a, overwrite=True)
开发者ID:Tyf0n,项目名称:nmrglue,代码行数:9,代码来源:integ.py


示例6:

#! /usr/bin/env python

import nmrglue.fileio.pipe as pipe
import nmrglue.process.pipe_proc as p

d,a = pipe.read("time_complex.fid")
d,a = p.xy2yx(d,a,auto=True)
pipe.write("xy.glue",d,a,overwrite=True)

d,a = pipe.read("time_complex.fid")
d,a = p.xy2yx(d,a,hyper=True)
pipe.write("xy2.glue",d,a,overwrite=True)

d,a = pipe.read("time_complex.fid")
d,a = p.xy2yx(d,a,nohyper=True)
pipe.write("xy3.glue",d,a,overwrite=True)
开发者ID:rpbarnes,项目名称:nmrglue,代码行数:16,代码来源:xy2yx.py


示例7:

#! /usr/bin/env python

import nmrglue.fileio.pipe as pipe
import nmrglue.process.pipe_proc as p

d,a = pipe.read("time_complex.fid")
d,a = p.gmb(d,a,lb=2.0,gb=0.5,c=1.0,inv=True)
pipe.write("gmb.glue",d,a,overwrite=True)

d,a = pipe.read("time_complex.fid")
d,a = p.gmb(d,a,lb=10,gb=0.2,c=0.5,start=20,size=800)
pipe.write("gmb2.glue",d,a,overwrite=True)
开发者ID:rpbarnes,项目名称:nmrglue,代码行数:12,代码来源:gmb.py


示例8:

#! /usr/bin/env python
""" Tests which show a differences between NMRPipe's and nmrglue's processing
functions and a fix is desired.  """

import nmrglue.fileio.pipe as pipe
import nmrglue.process.pipe_proc as p

# FSH
# the first three tests will fail because MIN/MAX values are off a little
d, a = pipe.read("1D_freq_real.dat")
d, a = p.fsh(d, a, dir="ls", pts=1)
pipe.write("fsh1.glue", d, a, overwrite=True)

d, a = pipe.read("1D_freq_real.dat")
d, a = p.fsh(d, a, dir="rs", pts=8)
pipe.write("fsh2.glue", d, a, overwrite=True)

d, a = pipe.read("1D_freq_real.dat")
d, a = p.fsh(d, a, dir="rs", pts=6.7)
pipe.write("fsh3.glue", d, a, overwrite=True)

# this fails because NMRPipe performs a Hilbert transform? If this is true it
# should be moved to the known_fail.py script.
d, a = pipe.read("1D_freq_complex.dat")
d, a = p.fsh(d, a, dir="ls", pts=9.5)
pipe.write("fsh4.glue", d, a, overwrite=True)

# RFT 
# these are off by small amounts, mostly min/max values
d, a = pipe.read("1D_freq_complex.dat")
d, a = p.rft(d, a)
开发者ID:Tyf0n,项目名称:nmrglue,代码行数:31,代码来源:to_fix.py


示例9:

#! /usr/bin/env python

import nmrglue.fileio.pipe as pipe
import nmrglue.process.pipe_proc as p

d,a = pipe.read("1D_time.fid")
d,a = p.ha(d,a)
pipe.write("ha1.glue",d,a,overwrite=True)

d,a = pipe.read("1D_time.fid")
d,a = p.ha(d,a,inv=True)
pipe.write("ha2.glue",d,a,overwrite=True)
开发者ID:rpbarnes,项目名称:nmrglue,代码行数:12,代码来源:ha.py


示例10:

#! /usr/bin/env python

import nmrglue.fileio.pipe as pipe
import nmrglue.process.pipe_proc as p

d,a = pipe.read("time_complex.fid")
d,a = p.zd(d,a,wide=1.0,x0=20,slope=2,func=0)
pipe.write("zd.glue",d,a,overwrite=True)

d,a = pipe.read("time_complex.fid")
d,a = p.zd(d,a,wide=5.0,x0=10,slope=5,func=1)
pipe.write("zd2.glue",d,a,overwrite=True)

d,a = pipe.read("time_complex.fid")
d,a = p.zd(d,a,wide=3.0,x0=100,slope=1,func=2)
pipe.write("zd3.glue",d,a,overwrite=True)

d,a = pipe.read("time_complex.fid")
d,a = p.zd(d,a,wide=8.0,x0=15,slope=3,func=3,g=20)
pipe.write("zd4.glue",d,a,overwrite=True)
开发者ID:rpbarnes,项目名称:nmrglue,代码行数:20,代码来源:zd.py


示例11:

#! /usr/bin/env python

import nmrglue.fileio.pipe as pipe
import nmrglue.process.pipe_proc as p

d,a = pipe.read("time_complex.fid")
d,a = p.sine(d,a,off=0.35,end=0.98,pow=2.0,c=1.0)
pipe.write("sine.glue",d,a,overwrite=True)

d,a = pipe.read("time_complex.fid")
d,a = p.sine(d,a,off=0.10,end=0.75,pow=1.0,c=0.5,size=200,one=True)
pipe.write("sine2.glue",d,a,overwrite=True)
开发者ID:rpbarnes,项目名称:nmrglue,代码行数:12,代码来源:sine.py


示例12:

#! /usr/bin/env python

import nmrglue.fileio.pipe as pipe
import nmrglue.process.pipe_proc as p

d,a = pipe.read("time_complex.fid")
d,a = p.qmix(d,a,ic=4,oc=2,cList=[0.1,0.2,0.3,0.4,
                                  0.5,0.6,0.7,0.8],time=False)
pipe.write("qmix.glue",d,a,overwrite=True)

d,a = pipe.read("time_complex.fid")
d,a = p.qmix(d,a,ic=2,oc=4,cList=[1.0,0.5,
                                  0.7,0.8,
                                  0.2,0.6,
                                  0.1,0.9],time=True)
pipe.write("qmix2.glue",d,a,overwrite=True)
开发者ID:rpbarnes,项目名称:nmrglue,代码行数:16,代码来源:qmix.py


示例13:

#! /usr/bin/env python

import nmrglue.fileio.pipe as pipe
import nmrglue.process.pipe_proc as p

# Apod Tests
d,a = pipe.read("time_complex.fid")
d,a = p.apod(d,a,qName="SP",q1=0.35,q2=0.98,q3=2.0)
pipe.write("apod1.glue",d,a,overwrite=True)

d,a = pipe.read("time_complex.fid")
d,a = p.apod(d,a,qName="EM",q1=10.0)
pipe.write("apod2.glue",d,a,overwrite=True)

d,a = pipe.read("time_complex.fid")
d,a = p.apod(d,a,qName="GM",q1=2.35,q2=1.25,q3=1.2)
pipe.write("apod3.glue",d,a,overwrite=True)

d,a = pipe.read("time_complex.fid")
d,a = p.apod(d,a,qName="GMB",q1=1.25,q2=3.0)
pipe.write("apod4.glue",d,a,overwrite=True)

d,a = pipe.read("time_complex.fid")
d,a = p.apod(d,a,qName="TM",q1=100,q2=200)
pipe.write("apod5.glue",d,a,overwrite=True)

d,a = pipe.read("time_complex.fid")
d,a = p.apod(d,a,qName="TRI",q1=500,q2=0.50,q3=0.8)
pipe.write("apod6.glue",d,a,overwrite=True)

d,a = pipe.read("time_complex.fid")
开发者ID:rpbarnes,项目名称:nmrglue,代码行数:31,代码来源:apod.py


示例14:

#! /usr/bin/env python
""" Create files for add unit test """

import nmrglue.fileio.pipe as pipe
import nmrglue.process.pipe_proc as p

d, a = pipe.read("time_complex.fid")
d, a = p.add(d, a, r=2.0, i=-1.0)
pipe.write("add1.glue", d, a, overwrite=True)

d, a = pipe.read("time_complex.fid")
d, a = p.add(d, a, c=10.0)
pipe.write("add2.glue", d, a, overwrite=True)

d, a = pipe.read("time_complex.fid")
d, a = p.add(d, a, c=10.0, x1=10, xn=400)
pipe.write("add3.glue", d, a, overwrite=True)

d, a = pipe.read("time_complex.fid")
d, a = p.add(d, a, ri=True, x1=50, xn=300)
pipe.write("add4.glue", d, a, overwrite=True)

开发者ID:Tyf0n,项目名称:nmrglue,代码行数:21,代码来源:add.py


示例15:

#! /usr/bin/env python

import nmrglue.fileio.pipe as pipe
import nmrglue.process.pipe_proc as p

d,a = pipe.read("time_complex.fid")
d,a = p.rev(d,a,sw=True)
pipe.write("rev1.glue",d,a,overwrite=True)

d,a = pipe.read("freq_real.ft2")
d,a = p.rev(d,a,sw=True)
pipe.write("rev2.glue",d,a,overwrite=True)

d,a = pipe.read("freq_real.ft2")
d,a = p.rev(d,a,sw=False)
pipe.write("rev3.glue",d,a,overwrite=True)
开发者ID:rpbarnes,项目名称:nmrglue,代码行数:16,代码来源:rev.py


示例16:

#! /usr/bin/env python

import nmrglue.fileio.pipe as pipe
import nmrglue.process.pipe_proc as p

d,a = pipe.read("time_complex.fid")
d,a = p.tri(d,a,loc=500,lHi=0.5,rHi=0.8,inv=True)
pipe.write("tri.glue",d,a,overwrite=True)

d,a = pipe.read("time_complex.fid")
d,a = p.tri(d,a,loc=750,lHi=0.1,rHi=0.5)
pipe.write("tri2.glue",d,a,overwrite=True)



开发者ID:thegooglecodearchive,项目名称:nmrglue,代码行数:12,代码来源:tri.py


示例17:

#! /usr/bin/env python

import nmrglue.fileio.pipe as pipe
import nmrglue.process.pipe_proc as p

d,a = pipe.read("time_complex.fid")
d,a = p.gm(d,a,g1=5.0,g2=2.0,g3=0.0,c=1.0)
pipe.write("gm.glue",d,a,overwrite=True)

d,a = pipe.read("time_complex.fid")
d,a = p.gm(d,a,g1=2.0,g2=5.0,g3=0.5,c=1.5,start=100,size=654,one=True)
pipe.write("gm2.glue",d,a,overwrite=True)


d,a = pipe.read("time_complex.fid")
d,a = p.gm(d,a,g1=2.0,g2=5.0,g3=0.5,c=1.5,start=100)
pipe.write("gm3.glue",d,a,overwrite=True)
开发者ID:rpbarnes,项目名称:nmrglue,代码行数:17,代码来源:gm.py


示例18:

#! /usr/bin/env python
""" Create files for shuf unit test """

import nmrglue.fileio.pipe as pipe
import nmrglue.process.pipe_proc as p

d, a = pipe.read("time_complex.fid")
d, a = p.shuf(d, a, mode="ri2c")
pipe.write("shuf1.glue", d, a, overwrite=True)

d, a = pipe.read("time_complex.fid")
d, a = p.shuf(d, a, mode="c2ri")
pipe.write("shuf2.glue", d, a, overwrite=True)

d, a = pipe.read("time_complex.fid")
d, a = p.shuf(d, a, mode="ri2rr")
pipe.write("shuf3.glue", d, a, overwrite=True)

d, a = pipe.read("time_complex.fid")
d, a = p.shuf(d, a, mode="exlr")
pipe.write("shuf4.glue", d, a, overwrite=True)

d, a = pipe.read("time_complex.fid")
d, a = p.shuf(d, a, mode="rolr")
pipe.write("shuf5.glue", d, a, overwrite=True)

d, a = pipe.read("time_complex.fid")
d, a = p.shuf(d, a, mode="swap")
pipe.write("shuf6.glue", d, a, overwrite=True)

d, a = pipe.read("time_complex.fid")
开发者ID:Tyf0n,项目名称:nmrglue,代码行数:31,代码来源:shuf.py


示例19:

#! /usr/bin/env python
""" Create files for set unit test """

import nmrglue.fileio.pipe as pipe
import nmrglue.process.pipe_proc as p

d, a = pipe.read("time_complex.fid")
d, a = p.set(d, a, r=1.0, i=2.0)
pipe.write("set1.glue", d, a, overwrite=True)

d, a = pipe.read("time_complex.fid")
d, a = p.set(d, a, c=3.0)
pipe.write("set2.glue", d, a, overwrite=True)

d, a = pipe.read("time_complex.fid")
d, a = p.set(d, a, r=8.0, i=-2.0, c=10.0)
pipe.write("set3.glue", d, a, overwrite=True)

d, a = pipe.read("time_complex.fid")
d, a = p.set(d, a, r=1.0, i=2.0, x1=50, xn=700)
pipe.write("set4.glue", d, a, overwrite=True)
开发者ID:Tyf0n,项目名称:nmrglue,代码行数:21,代码来源:set.py


示例20:

#! /usr/bin/env python
""" Create files for unit_conversion unit test """

import nmrglue.fileio.pipe as pipe
import nmrglue.process.pipe_proc as p

# points
d, a = pipe.read("1D_time.fid")
d, a = p.ext(d, a, x1=30, xn=340.6)
pipe.write("units1.glue", d, a, overwrite=True)

# percent
d, a = pipe.read("1D_time.fid")
xc = p.make_uc(d, a)
d, a = p.ext(d, a, x1=xc("11%"), xn=xc("60.2%"))
pipe.write("units2.glue", d, a, overwrite=True)

d, a = pipe.read("1D_time.fid")
xc = p.make_uc(d, a)
d, a = p.ext(d, a, x1=xc("20.5%"), xn=xc("78.9%"))
pipe.write("units3.glue", d, a, overwrite=True)

# Hz
d, a = pipe.read("1D_freq_real.dat")
xc = p.make_uc(d, a)
d, a = p.ext(d, a, x1=xc("24000 Hz"), xn=xc("12000 Hz"))
pipe.write("units4.glue", d, a, overwrite=True)

d, a = pipe.read("1D_freq_real.dat")
xc = p.make_uc(d, a)
d, a = p.ext(d, a, x1=xc("15693.7 Hz"), xn=xc("-1634.1 Hz"))
开发者ID:Tyf0n,项目名称:nmrglue,代码行数:31,代码来源:units.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python nn.searchnet函数代码示例发布时间:2022-05-27
下一篇:
Python pipe.read函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap