本文整理汇总了Python中PyDSTool.pointset_to_traj方法的典型用法代码示例。如果您正苦于以下问题:Python PyDSTool.pointset_to_traj方法的具体用法?Python PyDSTool.pointset_to_traj怎么用?Python PyDSTool.pointset_to_traj使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyDSTool
的用法示例。
在下文中一共展示了PyDSTool.pointset_to_traj方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: ref_traj1
# 需要导入模块: import PyDSTool [as 别名]
# 或者: from PyDSTool import pointset_to_traj [as 别名]
t_end = 12
if pert_time < t_end:
model.set(tdata=[0, pert_time])
model.compute('ref1')
ref_traj1 = model['ref1']
pts = ref_traj1.sample()
new_ic = ref_traj1(pert_time)
new_ic['V'] += dV
model.set(ics=new_ic,
tdata=[0, t_end-pert_time])
model.compute('ref2')
ref_traj2 = model['ref2']
pts2 = ref_traj2.sample()
pts2.indepvararray += pert_time
pts.extend(pts2, skipMatchingIndepvar=True)
ref_traj = dst.pointset_to_traj(pts)
model.set(ics=orig_ics)
else:
model.set(tdata=[0, t_end])
model.compute('ref')
ref_traj = model['ref']
else:
# get periodic orbit
t_end = 20
ref_traj, ref_pts, ref_tmin, ref_tmax = do_traj(model, t_end,
do_plot=False)
# re-sample traj at constant dt and declare to GUI
trajPts = ref_traj.sample(dt=0.01)[:-40] # cheap way to avoid overlap from pts not being periodic
#gui.add_data_points(trajPts)