本文整理汇总了Python中PALutils.createRmatrix方法的典型用法代码示例。如果您正苦于以下问题:Python PALutils.createRmatrix方法的具体用法?Python PALutils.createRmatrix怎么用?Python PALutils.createRmatrix使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PALutils
的用法示例。
在下文中一共展示了PALutils.createRmatrix方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: enumerate
# 需要导入模块: import PALutils [as 别名]
# 或者: from PALutils import createRmatrix [as 别名]
tt=[]
for p in psr:
tt.append(np.min(p.toas))
# find reference time
tref = np.min(tt)
# now scale pulsar time
for p in psr:
p.toas -= tref
# create list of reference residuals
res = [p.res for p in psr]
# get list of R matrices
R = [PALutils.createRmatrix(p.dmatrix, p.err) for p in psr]
L = []
for ct, p in enumerate(psr):
Amp = p.Amp
gam = p.gam
efac = p.efac
equad = p.equad
try:
cequad = p.cequad
except AttributeError:
cequad = 0
avetoas, U = PALutils.exploderMatrix(p.toas)
Tspan = p.toas.max()-p.toas.min()
示例2: enumerate
# 需要导入模块: import PALutils [as 别名]
# 或者: from PALutils import createRmatrix [as 别名]
# TODO: is this a very round about way to do this?
index = []
for ct,p in enumerate(pp):
if p.name == psr[ct].name:
index.append(ct)
else:
for ii in range(npsr):
if pp[ii].name == psr[ct].name:
index.append(ii)
pp = [pp[ii] for ii in index]
M = [PALutils.createQSDdesignmatrix(p.toas) for p in psr]
RQ = [PALutils.createRmatrix(M[ct], p.err) for ct, p in enumerate(psr)]
# construct noise matrix for new noise realizations
print 'Constructing noise cholesky decompositions'
L = []
for ct, p in enumerate(psr):
Amp = p.Amp
gam = p.gam
efac = p.efac
equad = p.equad
cequad = p.cequad
avetoas, U = PALutils.exploderMatrix(p.toas)
Tspan = p.toas.max()-p.toas.min()
F, f = PALutils.createfourierdesignmatrix(p.toas, 10, freq=True, Tspan=Tspan)