我有两个来自两个不同仪器的文本数据文件。一种是电梯,每隔7分钟和8分钟升降一次。我需要将一台仪器的数据与上下位置时间(持续时间为7或8分钟)的数据进行匹配(对齐)。以下是仪器(Picarro)和电梯(AEM)的数据:
一个问题是:Picarro时间是以UTC时间记录的,所以它实际上是下午6点,而不是午夜,而AEM是从午夜开始的。在
位置值表示位置上限(364)或下限(233)。在
仪器(Picarro)
Date Time NH3_Raw
2014-06-24 00:00:01.134 3.3844673297E+000
2014-06-24 00:00:03.210 3.1585870007E+000
2014-06-24 00:00:05.293 3.2442662514E+000
2014-06-24 00:00:06.812 3.2442662514E+000
2014-06-24 00:00:08.335 3.1064987772E+000`
电梯(AEM)
^{pr2}$我希望能够合并这两个单独的文件并输出到一个新的列表中。从这个新列表中,我想对数据执行统计分析、平均值、标准偏差等。但首先,我必须在这些时间范围内调整数据。AEM的时间间隔模式似乎是7、8、8、7分钟,然后重复,因此需要创建一些循环,我认为这远远超出了我的Python技能。我想沿着这个模式创建区间来证实数据。在
以下是一种可以使用的方法:
使用示例输入,
^{pr2}$aem.txt
:和
pic.txt
:打印结果:
相关问题 更多 >
编程相关推荐