API¶
API intro. Two functions, three constants classes. API functions work directly on files on disk; no options for in-memory-only (de)compression as yet
Functions
-
h5cube.
cube_to_h5
(cubepath, *, ...)¶ [Docstring]
-
h5cube.
h5_to_cube
(h5path, *, delsrc=False, prec=5)¶ [Docstring]
Less error/syntax checking here since presumably the data was parsed for validity when the .h5cube file was created.
Constants Classes
-
class
h5cube.
H5
¶ Names of
.h5cube
datasets and informational constantsArray shapes and types are those of the data stored in
.h5cube
files.-
COMMENT1
= 'COMMENT1'¶ First comment line
-
COMMENT2
= 'COMMENT2'¶ Second comment line
-
DSET_IDS
= 'DSET_IDS'¶ If
NATOMS
is negative, a length-NUM_DSETS
vector ofint
. Else, an emptyfloat
np.array
-
GEOM
= 'GEOM'¶ System geometry. 3N x 5
float
. Each line contains the atomic number \(\mathsf{[0]}\), atomic charge \(\mathsf{[1]}\) (typically – always? – equal to the atomic number), and position \(\mathsf{[2:]}\) of each atom
-
LOGDATA
= 'LOGDATA'¶ Base-10 logarithms of the absolute values of the volumetric data points (\(0.0\) for zero values). Dimension is identical to that of
SIGNS
.
-
SIGNS
= 'SIGNS'¶ Algebraic signs of the volumetric data points (\(0.0\) for zero values). For non-orbital CUBE files,
XAXIS[0]
xYAXIS[0]
xZAXIS[0]
array offloat
. For orbital CUBEs,XAXIS[0]
xYAXIS[0]
xZAXIS[0]
xNUM_DSETS
array offloat
.
-
XAXIS
= 'XAXIS'¶ x-axis voxel dimension \(\mathsf{[0]}\) and vector \(\mathsf{[1\!:]}\). Length-4
float
.
-
-
class
h5cube.
DEF
¶ Default values for (de)compression option parameters.
No default is given for the signed parameter to
cube_to_h5()
since it is irrelevant whenTHRESH
isFalse
.Similarly, since minmax and isofactor are irrelevant when
THRESH
isFalse
, their defaultNone
values are specified directly in thecube_to_h5()
signature.-
CLIPZERO
= False¶ Default is to clip small values to the thresholding limit with the smallest magnitude, as opposed to coercing to zero.
Todo
Add link to User’s Guide explanation of value vs zero clipping
-
COMP
= 9¶ Default gzip compression level.
-
DEL
= False¶ Default is not to delete source file in both compression and decompression.
-
PREC
= 5¶ Default output precision in decompressed CUBE file.
-
THRESH
= False¶ Default is not to threshold the CUBE data when compressing.
-
TRUNC
= 5¶ Default volumetric data truncation length during compression.
Todo
Add link to User’s Guide explanation of truncation when done.
-