Unpack binary data using ``struct.unpack``
    
    :param data_pointer: metadata for the ``data_pointer`` attribute for this data stream
    :type data_pointer: ``ahds.header.Block``
    :param definitions: definitions specified in the header
    :type definitions: ``ahds.header.Block``
    :param bytes data: raw binary data to be unpacked
    :return tuple output: unpacked data

def unpack_binary(data_pointer, definitions, data):
    """Unpack binary data using ``struct.unpack``
    
    :param data_pointer: metadata for the ``data_pointer`` attribute for this data stream
    :type data_pointer: ``ahds.header.Block``
    :param definitions: definitions specified in the header
    :type definitions: ``ahds.header.Block``
    :param bytes data: raw binary data to be unpacked
    :return tuple output: unpacked data 
    """
    
    if data_pointer.data_dimension:
        data_dimension = data_pointer.data_dimension
    else:
        data_dimension = 1 # if data_dimension is None
        
    if data_pointer.data_type == "float":
        data_type = "f" * data_dimension
    elif data_pointer.data_type == "int":
        data_type = "i" * data_dimension # assume signed int
    elif data_pointer.data_type == "byte":
        data_type = "b" * data_dimension # assume signed char

    # get this streams size from the definitions
    try: 
        data_length = int(getattr(definitions, data_pointer.data_name))
    except AttributeError:
        # quickfix
        """
        :TODO: nNodes definition fix
        """
        try:
            data_length = int(getattr(definitions, 'Nodes'))
        except AttributeError:
            x, y, z = definitions.Lattice
            data_length = x * y * z
        
    output = numpy.array(struct.unpack('<' + '{}'.format(data_type) * data_length, data)) # assume little-endian
    output = output.reshape(data_length, data_dimension)
    return output