nmrglue.fileio.varian.get_nblocks

nmrglue.fileio.varian.get_nblocks(f, nblocks, pts, nbheaders, dt, read_blockhead)[source]

Read multiple blocks from a Agilent/Varian binary file.

Parameters
ffile object

File object of open Agilent/Varian binary file.

nblockint

Number of blocks to read.

ptsint

Number of points per trace.

nbheadersint

Number of block header in each block.

dtdtype

Data type of data in binary file (real type).

read_blockheadersbool

True to read the blockheader(s) and return them in the returned dictionary. False ignores blockheader, reading over them.

Returns
dicdict, optional

Dictionary of blockheaders, only returned if read_blockheaders is True.

data2D ndarray of size (nblocks, pts)

Array of read blocks.