/ . / VolumeData / mrc / mrc_format.py / MRC_Data
file_type can be mrc or ccp4 .
Methods
|
|
|
read_matrix
|
read_matrix (
self,
ijk_origin,
ijk_size,
ijk_step,
progress,
)
Reads a submatrix from a the file.
Returns 3d numpy matrix with zyx index order.
|
|
read_values
|
read_values (
self,
file,
etype,
count,
)
Exceptions
|
|
SyntaxError, ('MRC file is truncated. Failed reading %d values, type %s' %( count, etype.__name__ ) )
|
|
|
check_header_values
|
check_header_values (
self,
v,
file_size,
file,
)
Exceptions
|
|
SyntaxError, msg
SyntaxError, ('Bad MRC grid size (%d,%d,%d)' %(v [ 'nc' ], v [ 'nr' ], v [ 'ns' ] ) )
|
|
|
value_type
|
value_type (
self,
mode,
unsigned_8_bit,
)
Exceptions
|
|
SyntaxError, ( 'MRC data value type (%d) ' % mode + 'is not 8 or 16 bit integers or 32 bit floats' )
|
|
|
permute_matrix_to_xyz_axis_order
|
permute_matrix_to_xyz_axis_order ( self, matrix )
|
|
read_header_values
|
read_header_values (
self,
file,
file_size,
file_type,
)
Format derived from C header file mrc.h.
Exceptions
|
|
SyntaxError, ('MRC header value nsymbt (%d) is invalid' % v [ 'nsymbt' ] )
|
|
|
__init__
|
__init__ (
self,
path,
file_type,
)
|
|
read_values_from_string
|
read_values_from_string (
self,
string,
etype,
count,
)
|
|
|