h2x: utilities to read and convert hdf5 to xdf

Convert hdf5 files to xdf files.

Use: Hdf2Xdf [-h] [hdfdir] [xdfdir]

When directories containing the hdf files and directories where the xdf should go are not given, pop-up selection tools appear:

  • select the approprate files interactively (multiple file selection allowed).

  • select the directory to which to write to the xdf data file(s).

Otherwise provide the directories with the hdf (.h5) files and the directory where the xdf files should go

Both I and Q data are written into the xdf file.

class tesfdmtools.hdf.h2x.Xdf(xdfname, h5attrs)[source]

New Xdf datafile object

Args:
  • xdfname = file name of the xdf file to be written

  • h5attrs = dictionary with the critcal HDF5 attributes for the xdf file

close()[source]

Close the xdf file. Rewrite header with actual number of events written.

write(recno, record)[source]

Write an xdf data record

Args:
  • recno = number of the record to be written

  • record = HDF5 FDM record object, containing I and Q data plus attributes

tesfdmtools.hdf.h2x.hdf2xdf(hdfname, xdfdir)[source]

Convert HDF5 FDM datafile to the old xdf file format. Multiple xdf files will be written. One file for each channel and pixel.

Args:
  • hdfname = name of the HDF5 file

  • xdfdir = directory where the new xd ffiles should go

Returns:

none

tesfdmtools.hdf.h2x.xdfheader(h5attrs)[source]

Assemble xdf header

Args:
  • h5attrs = dictionary with the critcal HDF5 attributes for the xdf file

Returns:
  • header = the xdf header (byte string)