本文整理汇总了Python中common.PostProcess.time_array方法的典型用法代码示例。如果您正苦于以下问题:Python PostProcess.time_array方法的具体用法?Python PostProcess.time_array怎么用?Python PostProcess.time_array使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类common.PostProcess
的用法示例。
在下文中一共展示了PostProcess.time_array方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: read_limits
# 需要导入模块: from common import PostProcess [as 别名]
# 或者: from common.PostProcess import time_array [as 别名]
print "Given result file does not exist: {0}".format(sys.argv[1])
os._exit(3)
## First limit part
limit_dict, filter = read_limits()
## End of first limit part
## Post processing part
filter.append("road_Wheel_Load_Both_Sides.vehicleSpeed")
# loads results with the filtered out variables (and 'time' which is default)
pp = PostProcess(mat_file_name, filter)
metrics = {}
speed_array = pp.data_array("road_Wheel_Load_Both_Sides.vehicleSpeed")
time_array = pp.time_array()
n = len(speed_array)
acc10kph = -1
points = range(n)
for i in points:
if speed_array[i] < -10:
acc10kph = time_array[i]
break
max_rev_speed = speed_array[-1]
points.reverse()
tol = 0.001
time_to_max = 0
for i in points: