viscid.readers.vpic module

VPIC binary file reader

Note

Since this reader uses deferred datasets, you will need to use the following to dump the available field names,

>>> import viscid
>>> f = viscid.load_file(os.path.join(sample_dir, 'vpic_sample',
>>>                                   'global.vpc'))
>>> f.get_grid().print_tree()
class viscid.readers.vpic.VPIC_BinFileWrapper(filename)[source]

Bases: object

A File-like object for interfacing with VPIC binary files

close()[source]
filename = None
isopen
open()[source]
read_field(comp, slicex=slice(None, None, None), slicey=slice(None, None, None), slicez=slice(None, None, None), dtype=<type 'numpy.float32'>)[source]
read_header()[source]
class viscid.readers.vpic.VPIC_DataWrapper(file_wrapper, fld_name, expected_shape, fld_number, dtype)[source]

Bases: viscid.readers.vfile.DataWrapper

dtype
expected_shape = None
file_wrapper = None
filename = None
fld_name = None
fld_number = None
len()[source]
read_direct(*args, **kwargs)[source]
shape

zyx shape since that’s the shape __array__ returns

Type:Returns
class viscid.readers.vpic.VPIC_File(fname, **kwargs)[source]

Bases: viscid.readers.vfile.VFile

An VPIC binary file reader

load(fname)[source]
class viscid.readers.vpic.VPIC_Grid(*args, **kwargs)[source]

Bases: viscid.grid.Grid