neurotools.util.hdfmat module

Routines for handling the new-style .mat files, which are secretly .hdf files

neurotools.util.hdfmat.getHDFvalue(hdf, d, squeeze=True, detectString=True, detectScalar=True)[source]

Unpack a value from a HDF5 file

Parameters:
  • hdf (hdf file or subdirectory object)

  • path (string) – Subpath to extract within hdf file or subdirectory object

neurotools.util.hdfmat.getHDF(hdf, path, sep=None, squeeze=True, detectString=True, detectScalar=True)[source]

Retrieve path from nested dictionary obtained from an HDF5 file. Path separator is /.

Parameters:
  • hdf (hdf file or subdirectory object)

  • path (string) – Subpath to extract within hdf file or subdirectory object

Return type:

extracted hdf file or subdirectory object

neurotools.util.hdfmat.hdf2dict(d)[source]

Recursively convert HFDF5 Matlab outbut into a nested dict

neurotools.util.hdfmat.printmatHDF5(d)[source]

formatted printing for .mat style dicts

neurotools.util.hdfmat.recursive_printmatHDF5(d, prefix=' ')[source]
neurotools.util.hdfmat.matversion(fn)[source]
neurotools.util.hdfmat.matstrip(data)[source]
neurotools.util.hdfmat.mat5todict(data)[source]