parse

Module Contents

Functions

dataset_data_parse(obj, h5)

data parser for dataset class

image_data_parse(obj, h5)

data parser for dataset_image class

video_data_parse(obj, h5)

data parser for dataset_video class

create_instance(root, key)

create the corresponding object and assign attribute

recursive_create_instance(file)

recursively create object and assign attributes

pykkn_parse(path)

read a HDF5 file and convert it to pykkn data management structure

parse.dataset_data_parse(obj, h5)

data parser for dataset class

Parameters
  • obj (object) – pykkn component class object without data

  • h5 (h5py.File) – HDF5 file structure or sub structure

Returns

pykkn component class object with data

Return type

object

parse.image_data_parse(obj, h5)

data parser for dataset_image class

Parameters
  • obj (object) – pykkn component class object without data

  • h5 (h5py.File) – HDF5 file structure or sub-structure

Returns

pykkn component class object with data

Return type

object

parse.video_data_parse(obj, h5)

data parser for dataset_video class

Parameters
  • obj (object) – pykkn component class object without data

  • h5 (h5py.File) – HDF5 file structure or sub-structure

Returns

pykkn component class object with data

Return type

object

parse.create_instance(root, key)

create the corresponding object and assign attribute

Parameters
  • root (h5py.File) – HDF5 file structure or sub-structure

  • key (str) – name of this object

Returns

pykkn components object

Return type

object

Raises
  • TypeError – raised when given a wrong dataset class

  • TypeError – raised when given a wrong component class

parse.recursive_create_instance(file)

recursively create object and assign attributes

Parameters

file (h5py.File) – HDF5 file structure or sub-structure

Returns

a list of pykkn component objects

Return type

List[object]

parse.pykkn_parse(path)

read a HDF5 file and convert it to pykkn data management structure

Parameters

path (str) – path of HDF5 file

Returns

one of the component types the type of return depends on the structure of json structure

Return type

object