pimpy.hdf5 – HDF5 storage data module

class pimpy.hdf5.FeatureSet(fs, timescale=None, nbdim=None, dtype=None)

FeatureSet class

create av feature set

Parameters:
  • fs – feature hdf5 group
  • timescale – time scale in microsecond
  • nbdim – number of dimemsions
  • dtype – datatype
Type:

h5py.Group

Type:

int

Type:

int

Type:

numpy.dtype

read(begin=None, end=None)

return array data (shape [data] or [[data1,data2,..]])

Parameters:
  • begin – start time
  • end – stop time
Type:

int

Type:

int

Return type:

numpy.array

write(array, begin=None, end=None)

write array data in FeatureSet must [data] or [[data1,data2,..]]

Parameters:
  • array – data
  • begin – start time
  • end – stop time
Type:

numpy.array

Type:

int

Type:

int

class pimpy.hdf5.File(file_path, mediafile_path=None, block_size=1000000)
Class attributes:
 
  • groups
    visual or audio

Constructor

Parameters:
  • file_path – hdf5 file path
  • mediafile_path – medium file path
Type:

string

Type:

string

close()
flush data and close file
create_avfeature_set(group, name, desc_datasets, timescale=None)

create a new AudioVisual feature dataset

Param:group like visual, audio
Type:string
Param:feature name
Type:string
Param:desc_datasets tuple which describe feature structure
Type:tuple (name:string,number of dimension:int,datatype= numpy.dtype)
Param:timescale in microseconds
Type:int
Return type:dict of pynocchio.dataset
get_avfeature_set(group, name)
retrieve Audiovisual features dataset :rtype: dataset
getmediafileMD5()
return the MD5 checksum associated with the mediafile :rtype string: MD5 mediafile hash string
getmediafilepath()
return the associated mediafile path :rtype string: mediafile path
relocate(mediafile_path)
relocate mediafile_path if changed and md5 value not differ :param mediafile_path: media file path :type: string

Previous topic

pimpy.video – Video Media Module

This Page