

def __attach_v1(self, shape, source, name, attribute, offset=0):
    'Attach a single value stream to the JSON representation. Also calculates the min and max range.'
    elements = []
    min_x = source[0]
    max_x = source[0]
    for x in source:
        elements.append(x)
        min_x = min(x, min_x)
        max_x = max(x, max_x)
    self.__set_source(shape, name, 1, [min_x], [max_x], elements)
    self.__set_input(shape, attribute, {
        'source': name,
        'offset': offset,
    })

dataset/ETHPy150Open turbulenz/turbulenz_tools/turbulenz_tools/tools/asset2json.py JsonAsset.__attach_v1/original