nmrglue.fileio.varian.get_nblocks_ntraces
- nmrglue.fileio.varian.get_nblocks_ntraces(f, nblocks, ntraces, pts, nbheaders, dt, read_blockhead)[source]
Read multiple blocks from a Agilent/Varian binary file which may have multiple traces per block.
- Parameters
- ffile object
File object of open Agilent/Varian binary file.
- nblockint
Number of blocks to read.
- ntraceint
Number of traces per block
- 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 * ntraces, pts)
Array of read blocks.