# Path: nptdms/types.py
# def tds_data_type(enum_value, np_type, set_np_type=True):
#     def decorator(cls):
#     def __init__(self):
#     def __eq__(self, other):
#     def __repr__(self):
#     def read(cls, file, endianness="<"):
#     def read_values(cls, file, number_values, endianness="<"):
#     def __init__(self, value):
#     def __init__(self, value):
#     def read(cls, file, endianness="<"):
#     def from_bytes(cls, byte_array, endianness="<"):
#     def __init__(self, value):
#     def read(file, endianness="<"):
#     def read_values(cls, file, number_values, endianness="<"):
#     def __init__(self, value):
#     def read(cls, file, endianness="<"):
#     def __init__(self, value):
#     def read(cls, file, endianness="<"):
#     def from_bytes(cls, byte_array, endianness="<"):
# class TdmsType(object):
# class Bytes(TdmsType):
# class StructType(TdmsType):
# class Void(TdmsType):
# class Int8(StructType):
# class Int16(StructType):
# class Int32(StructType):
# class Int64(StructType):
# class Uint8(StructType):
# class Uint16(StructType):
# class Uint32(StructType):
# class Uint64(StructType):
# class SingleFloat(StructType):
# class DoubleFloat(StructType):
# class ExtendedFloat(TdmsType):
# class SingleFloatWithUnit(StructType):
# class DoubleFloatWithUnit(StructType):
# class ExtendedFloatWithUnit(TdmsType):
# class String(TdmsType):
# class Boolean(StructType):
# class TimeStamp(TdmsType):
# class ComplexSingleFloat(TdmsType):
# class ComplexDoubleFloat(TdmsType):
# class DaqMxRawData(TdmsType):


import numpy as np
    import h5py
from nptdms import types
    # Channels in TDMS are then mapped to the second level of the HDF5
    # hierarchy, under the appropriate groups.

    # Properties in TDMS are mapped to attributes in HDF5.
    # These all exist under the appropriate, channel group etc.

    h5file = h5py.File(filepath, mode)

    if group in h5file:
        container_group = h5file[group]
    else:
        container_group = h5file.create_group(group)

    # First write the properties at the root level
    for property_name, property_value in tdms_file.properties.items():
        container_group.attrs[property_name] = _hdf_attr_value(property_value)

    # Now iterate through groups and channels,
    # writing the properties and creating data sets
    datasets = {}
    for group in tdms_file.groups():
        # Write the group's properties
        container_group.create_group(group.name)
        for prop_name, prop_value in group.properties.items():
            container_group[group.name].attrs[prop_name] = _hdf_attr_value(prop_value)

        # Write properties and data for each channel
        for channel in group.channels():
            channel_key = group.name + '/' + channel.name


# Path: nptdms/types.py
# def tds_data_type(enum_value, np_type, set_np_type=True):
#     def decorator(cls):
#     def __init__(self):
#     def __eq__(self, other):
#     def __repr__(self):
#     def read(cls, file, endianness="<"):
#     def read_values(cls, file, number_values, endianness="<"):
#     def __init__(self, value):
#     def __init__(self, value):
#     def read(cls, file, endianness="<"):
#     def from_bytes(cls, byte_array, endianness="<"):
#     def __init__(self, value):
#     def read(file, endianness="<"):
#     def read_values(cls, file, number_values, endianness="<"):
#     def __init__(self, value):
#     def read(cls, file, endianness="<"):
#     def __init__(self, value):
#     def read(cls, file, endianness="<"):
#     def from_bytes(cls, byte_array, endianness="<"):
# class TdmsType(object):
# class Bytes(TdmsType):
# class StructType(TdmsType):
# class Void(TdmsType):
# class Int8(StructType):
# class Int16(StructType):
# class Int32(StructType):
# class Int64(StructType):
# class Uint8(StructType):
# class Uint16(StructType):
# class Uint32(StructType):
# class Uint64(StructType):
# class SingleFloat(StructType):
# class DoubleFloat(StructType):
# class ExtendedFloat(TdmsType):
# class SingleFloatWithUnit(StructType):
# class DoubleFloatWithUnit(StructType):
# class ExtendedFloatWithUnit(TdmsType):
# class String(TdmsType):
# class Boolean(StructType):
# class TimeStamp(TdmsType):
# class ComplexSingleFloat(TdmsType):
# class ComplexDoubleFloat(TdmsType):
# class DaqMxRawData(TdmsType):


# Path: nptdms/export/hdf_export.py
import numpy as np
    import h5py
from nptdms import types

    # Channels in TDMS are then mapped to the second level of the HDF5
    # hierarchy, under the appropriate groups.

    # Properties in TDMS are mapped to attributes in HDF5.
    # These all exist under the appropriate, channel group etc.

    h5file = h5py.File(filepath, mode)

    if group in h5file:
        container_group = h5file[group]
    else:
        container_group = h5file.create_group(group)

    # First write the properties at the root level
    for property_name, property_value in tdms_file.properties.items():
        container_group.attrs[property_name] = _hdf_attr_value(property_value)

    # Now iterate through groups and channels,
    # writing the properties and creating data sets
    datasets = {}
    for group in tdms_file.groups():
        # Write the group's properties
        container_group.create_group(group.name)
        for prop_name, prop_value in group.properties.items():
            container_group[group.name].attrs[prop_name] = _hdf_attr_value(prop_value)

        # Write properties and data for each channel
        for channel in group.channels():
            channel_key = group.name + '/' + channel.name


            if channel.data_type is types.String: