def get_block_ntraces(f, ntraces, pts, nbheaders, dt, read_blockhead=False):

    if read_blockhead is False:  # do not return blockheaders
        for i in range(nbheaders):
            skip_blockheader(f)
        trace = get_trace(f, pts * ntraces, dt)
        return trace.reshape(ntraces, pts)
    else:   # read the blockheaders
        dic = dict()
        # read the headers
        if nbheaders >= 1:
            dic.update(blockheader2dic(get_blockheader(f)))
        if nbheaders >= 2:
            dic["hyperhead"] = hyperheader2dic(get_hyperheader(f))
        if nbheaders >= 3:
            for i in range(2, nbheaders):
                skip_blockheader(f)
        # read the data
        trace = get_trace(file, pts * ntraces, dt)
        return dic, trace.reshape(ntraces, pts)
Read a single block from Agilent/Varian binary file which may have
dataset/ETHPy150Open jjhelmus/nmrglue/nmrglue/fileio/varian.py/get_block_ntraces