carputils.carpio.igb
.IGBFilecarputils.carpio.igb.
IGBFile
(filename, mode='r')IGB format file IO class.
Direct read/write to gzipped files is possible. The class automatically determines if the file is gzipped by its extension.
close
()Close the file object.
data
()Return a numpy array of the file contents.
The data is returned as a flat array. It is up to the user to use the header information to determine how to reshape the array, if desired.
dtype
()Get a numpy-friendly data type for this file.
header
()Read the IGB file header and return as python dictionary.
write
(data, header={})Write a numpy array to the IGB file.
Some header fields are automatically determined from the numpy array. Others must be specified as additional keyword arguments.
Not all IGB output formats are currently supported. For that reason, the input numpy array data type must be single.