FourierIndexer#
- class cbclib.FourierIndexer(val, x, y, z, num_threads=1)[source]#
3D data object designed to perform Fourier auto-indexing. Projects measured intensities to the reciprocal space and provides several tools to works with a 3D data in the reciprocal space. The container uses the FFTW C library to perform the 3-dimensional Fourier transform.
- Parameters
- clip(vmin, vmax)#
Clip the 3D data in a range of values
[vmin, vmax].
- fft()#
Perform 3D Fourier transform. FFTW C library is used to compute the transform.
- Return type
~M- Returns
A 3Ddata object with the Fourier image data.
See also
cbclib.bin.FFTW : Python wrapper of FFTW library.
- filter_direction(axis, rng, sigma)[source]#
Mask out a specific direction in 3D data. Useful for correcting artifacts in a Fourier image caused by the detector gaps.
- Parameters
- Return type
- Returns
New
FourierIndexerobject with the masked out 3D data.
- find_peaks(val, dmin=0.0, dmax=inf)[source]#
Find a set of basis vectors, that correspond to the peaks in the 3D data, that lie above the threshold
val.
- fitness(x, center, sigma, cutoff)[source]#
Criterion function for Fourier autoindexing based on maximising the intersection between the experimental mapping and a grid of guassian peaks defined by a set of basis vectors
xand lying in the sphere of radiuscutoff.
- gaussian_blur(sigma)#
Apply Gaussian blur to the 3D data.
- get_coordinates(index)#
Transform a set of data indices to a set of coordinates.
- classmethod import_hdf(path, key)#
Initialize a 3D data container with data saved in a HDF5 file
pathat akeykey inside the file.
- interpolate(coordinates)#
Interpolate the 3D grid at a given array of coordinates
coordinates.
- is_compatible(map_3d)#
Check if 3D data object has a compatible set of coordinates.
- Parameters
map_3d (
~M) – 3D data object.- Return type
- Returns
True if the 3D data object
map_3dhas a compatible set of coordinates.
- reduce_peaks(center, peaks, sigma, cutoff=None)[source]#
Reduce a set of peaks
peaksto three basis vectors, that maximise the intersection between the experimental mapping and a grid of peaks formed by the basis. The grid of peaks is confined in a sphere of radiuscutoff.- Parameters
Returns:
- Return type
- to_dict()#