How to view the HDF5 data

Standard HDF5 viewer

You can use HDF5 viewer to see the file content. Here you can find some screenshots and description of main groups and datasets in the h5 file with pulse data.

Python: reading the HDF5 file using h5py

h5py python package provides full access to the h5 files. See ipython notebook for example of data analysis and visualization. You can also use the following command for quick view the file content:


import h5py
f = h5py.File(h5_filename,'r')
for item in f.keys():
    print item #+ ":", f[item]

data  
history  
misc  
params  
version

Printing out a group content:


for item in f.require_group('params').keys():
    print 'params/'+item

params/Mesh  
params/Rx  
params/Ry  
params/dRx  
params/dRy
params/nval
params/photonEnergy
params/wDomain
params/wEFieldUnit
params/wSpace
params/xCentre
params/yCentre

Printing out subgroup content


for item in f['params/Mesh'].keys():
    item_path = 'params/Mesh/'+item
    print item_path+':\t',f[item_path].value

params/Mesh/nSlices:    360
params/Mesh/nx:    201
params/Mesh/ny:    201
params/Mesh/sliceMax:    2.99167e-15
params/Mesh/sliceMin:    -2.99167e-15
params/Mesh/xMax:    0.000459939
params/Mesh/xMin:    -0.000459939
params/Mesh/yMax:    0.000459939
params/Mesh/yMin:    -0.000459939
params/Mesh/zCoord:    0.0

Calculating time step:


nt =   f['params/Mesh/nSlices'].value
tmin = f['params/Mesh/sliceMin'].value
tmax = f['params/Mesh/sliceMax'].value
print 'time step %.3f fs' %((tmax-tmin)/(nt-1)*1e15)

time step 0.017 fs

Electric field units:


print 'wEFieldUnit: ' + f['params/wEFieldUnit'].value

wEFieldUnit: sqrt(W/mm^2)
In [ ]: