Density.empty#

property Density.empty#

Returns a copy of the class instance with all elements in Density.data set to zero. Density.metadata will be initialized accordingly. Density.origin and Density.sampling_rate are copied.

Returns:
Density

Empty class instance.

Examples

>>> import numpy as np
>>> from tme import Density
>>> original_density = Density.from_file("/path/to/file.mrc")
>>> empty_density = original_density.empty
>>> np.all(empty_density.data == 0)
True