Wendelin Home Wendelin

    Wendelin Hyperconvergence Tutorial - Screenshot Jupyter ERP5 Run Big File Reader

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

    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")

    cmplx = Fft(out_of core array.getArray())
    spectrum = abs(cmplx[: (len(cmplx)/2)-1]) # not out of core

    # save the spectrum array to make it now out of core
    out_of_core_spectrun_array = context.data array_module.newContent(
    array=spectrum,
    portal_type="Data Array",
    title="pydata-spectrum2")

    figure = plt.figure()

    ax1 = figure.add_subplot(211)
    ax2 = figure.add_subplot(212)

    ax1.plot(out_of core_array.getArray())
    ax2.plot (out_of_core_spectrum_array.getArray())

    # figure.show() don't present inline rendering....
    # S0 we use instead:
    context .Base_renderAsHtml(plt)