Wendelin Home Wendelin

    Wendelin Hyperconvergence Tutorial - Screenshot Jupyter ERP5 Use Big File Reader

    Wendelin Hyperconvergence Tutorial - Juypter ERP5 Use Big File Reader
    • Last Update:2016-06-15
    • Version:001
    • Language:

    class BigFileReader:

    def _init_(self, bigfile):
    self bigfile = bigfile
    self.pos = 0

    def tell(self):
    return self.pos

    def seek(self, pos): # TODO whence
    # T0DO check for out of range
    self.pos = pos

    def read(self, n):
    chunkv = []
    for chunk in self.bigfile.iterate(self.pos, n):
    chunkv . append(chunk)
    data = ''.join(chunkv)
    self.pos += len(data)
    return data

    s, data = read(BigFileReader (context.data_stream module["1"].data))

    # Get only channel
    array = data.T[6] # not out of core

    # save the array to erp5 to make it out-of-core
    out_of core_array = context.data_array_module.newContent(
    array=array,
    portal_type="Data Array",
    title="pydata-wav2")



    emplx = fft(out_of _core_array.getArray())