0
3D HDF的具体Z分量片有谁知道如何使下面的代码的修改,这样我可以读取3D HDF数据在Python的具体Z分量分得一杯羹?正如你从附加图像中看到的,z值的范围是从0到160,我只想绘制'80'。尺寸是400x160x160。这是我的代码。阅读从Python的
import h5handler as h5h
h5h.manager.setPath('E:\data\Data5', False)
for i in np.arange(0,1,5000):
cycleFile = h5h.CycleFile(h5h.manager.cycleFiles['cycle_'+str(i)+'.hdf'], 'r')
fig = plt.figure()
fig.suptitle('Cycle_'+str(i)+' at t=14.4s', fontsize=20)
ax1 = plt.subplot(311)
ax2 = plt.subplot(312)
ax3 = plt.subplot(313)
Bx = np.reshape(cycleFile.get('/fields/Bx').value.T, (160,400))*6.872130320978866e-06*(1e9)