tdms文件加载和优化加载的进度条

时间:2018-04-19 18:06:29

标签: python optimization progress-bar loading

我正在使用TdmsFile()加载大型tdms文件,我想添加一个进度条,告诉我进度和剩余时间。我尝试过progressbar和tqdm,但我找不到在我的代码中实现这些的方法(下面)。这可能吗?

另外,文件非常大,加载每个文件需要5分钟以上。我必须多次这样做,所以我想找到一种优化方法,而不会丢失任何数据。关于如何做到这一点的任何想法。

非常感谢。

这是我正在使用的代码:

tdms_file = TdmsFile(photometryfile) 
channel1_470 = tdms_file.object('Untitled', 'Voltage_0 (Filtered)')
channel1_405 = tdms_file.object('Untitled', 'Voltage_0 (Filtered) 1')
channel2_470 = tdms_file.object('Untitled', 'Voltage_1 (Filtered)')
channel2_405 = tdms_file.object('Untitled', 'Voltage_1 (Filtered) 1')
channel3_470 = tdms_file.object('Untitled', 'Voltage_2 (Filtered)')
channel3_405 = tdms_file.object('Untitled', 'Voltage_2 (Filtered) 1')
channel4_470 = tdms_file.object('Untitled', 'Voltage_3 (Filtered)')
channel4_405 = tdms_file.object('Untitled', 'Voltage_3 (Filtered) 1')
data1_470 = channel1_470.data
time1_470 = channel1_470.time_track()
data1_405 = channel1_405.data
time1_405 = channel1_405.time_track()
data2_470 = channel2_470.data
time2_470 = channel2_470.time_track()
data2_405 = channel2_405.data
time2_405 = channel2_405.time_track()
data3_470 = channel3_470.data
time3_470 = channel3_470.time_track()
data3_405 = channel3_405.data
time3_405 = channel3_405.time_track()
data4_470 = channel4_470.data
time4_470 = channel4_470.time_track()
data4_405 = channel4_405.data
time4_405 = channel4_405.time_track()

0 个答案:

没有答案