tomodrgn.utils#
Common utility functions pertaining to both data processing and script execution
Functions
Helper function to calculate the zero-mean correlation coefficient as defined in eq 2 in https://journals.iucr.org/d/issues/2018/09/00/kw5139/index.html vol1 and vol2 should be maps of the same box size, shape (boxsize, boxsize, boxsize) |
|
Calculate the FSC between two volumes with optional masking. |
|
Calculate a binary mask to later be multiplied into a fourier space volume to lowpass filter said volume. |
|
Generate a real space mask generated from up to two volumes |
|
Get the git revision hash of a git repository. |
|
Get the current memory usage of the specified device_type. |
|
Decorator. |
|
Write a string to outfile with a standardized datetime format. |
|
Determine whether a CUDA-capable GPU is availble or not for torch operations. |
|
Detect the latest completed epoch of model training. |
|
Convenience function to read a binary pickle file. |
|
Write a string to STDOUT with a standardized datetime format. |
|
Lowpass-filters a volume in reciprocal space. |
|
Test which of various modifications to the image .mrcs files correctly locates the files on disk. |
|
Display an ASCII progress bar in STDOUT. |
|
Convert Euler angles from EMAN to a 3-D rotation matrix. |
|
Convert Euler angles from RELION to a 3-D rotation matrix. |
|
Convert a Nx3 array of RELION euler angles to rotation matrices using Scipy Rotations class. |
|
Convert an array of Nx3x3 rotation matrices to RELION euler angles using Scipy Rotations class. |
|
Convenience function to write data to a binary pickle file. |
|
Write a string to STDOUT with a standardized datetime format only if _verbose is True. |
|
Return rotation matrix associated with rotation over the x-axis. |
|
Return rotation matrix associated with rotation over the y-axis |
|
Set volume values outside of a sphere inscribed within a cube to zero. |
Classes
Decorator. |