def write_fid(filename, dic, data, torder='flat', repack=False, correct=True,
              overwrite=False):
    data = np.array(data)

    # convert 1D data to 2D
    if data.ndim == 1:
        data = data.reshape((1, data.shape[0]))

    # reform 3D+ data
    if data.ndim >= 3:
        data = order_data(data, torder)

    # verify data and dic shapes
    if data.shape[1] != (dic['np'] // 2):
        warn("data and np size mismatch")
        if correct:
            dic['np'] = int(data.shape[1] * 2)
    if data.shape[0] != dic["nblocks"]:
        warn("data and block size mismatch")
        if correct:
            dic['nblocks'] = int(data.shape[0])

    # open file for writing
    f = fileiobase.open_towrite(filename, overwrite=overwrite)

    if repack:
        dic = repack_fileheader(dic)

    # write the fileheader to file
    put_fileheader(f, dic2fileheader(dic))

    # determind data type
    dt = find_dtype(dic)

    if "blockheader" in dic and len(dic["blockheader"]) == data.shape[0]:
        for i in range(data.shape[0]):
            if repack:
                bh = dic2blockheader(repack_blockheader(dic["blockheader"][0]))
            else:
                bh = dic2blockheader(dic["blockheader"][i])

            trace = np.array(interleave_data(data[i]), dtype=dt)
            put_block(f, trace, dic["nbheaders"], bh)

    else:   # create a generic blockheader
        bh = dic2blockheader(make_blockheader(dic, 1))
        for i in range(data.shape[0]):
            bh[2] = int(i + 1)
            trace = np.array(interleave_data(data[i]), dtype=dt)
            put_block(f, trace, dic["nbheaders"], bh)

    f.close()
    return
Get the result of this transfer.
dataset/ETHPy150Open jjhelmus/nmrglue/nmrglue/fileio/varian.py/write_fid--crossover with--dataset/ETHPy150Open mbedmicro/pyOCD/pyOCD/pyDAPAccess/dap_access_usb.py/_Transfer.get_result