[cctbxbb] map grid sizes
Ten Eyck, Lynn
lteneyck at sdsc.edu
Thu Feb 20 17:28:09 PST 2020
FFT's require as many small prime factors as possible (which one of two reasons powers of two are preferred), but another factor is that the Hermitian symmetry of the electron density map (F(h,k,l) = F*(-h,-k,-l)) means not only that the F(0) term is real, but also (if there are an even number of points) the F(N/2) term is real, since we are dealing with finite discrete transforms rather than integral continuous transforms. This give the implementor a choice -- either pack the extra real number in the imaginary part of the F(0) term, or create an extra scratch location at the end of the (complex) array. In the first case you have to do some special case code, and in the second case you have to burn some memory.
Back in the 1960's and 1970's when I wrote my FFT routines for crystallography memory was VERY expensive so I optimized memory use. It is easier to stick the extra location at the end of the row, but you have to account for it in the indexing calculations.
Lynn Ten Eyck
From: cctbxbb-bounces at phenix-online.org <cctbxbb-bounces at phenix-online.org> on behalf of Nicholas Sauter <nksauter at lbl.gov>
Sent: Tuesday, February 18, 2020 5:34 PM
To: cctbx mailing list
Subject: Re: [cctbxbb] map grid sizes
Possibly because the "Fast" aspect of the "FFT" requires the map size to have a prime factorization of small factors, generally combinations of powers of 2, 3, 5, 7, and 11, in order for the algorithm to work. Here's some basic documentation from the web: http://www.fftw.org/fftw2_doc/fftw_3.html
Nicholas K. Sauter, Ph. D.
Senior Scientist, Molecular Biophysics & Integrated Bioimaging Division
Lawrence Berkeley National Laboratory
1 Cyclotron Rd., Bldg. 33R0345
Berkeley, CA 94720
On Tue, Feb 18, 2020 at 9:43 AM GEORGE N PHILLIPS <george.phillips at wisc.edu<mailto:george.phillips at wisc.edu>> wrote:
I am confused about grid sizes of maps.
When i specify a grid size for an fft_map but then pull the numpy array out for direct manimpulation, it's always 2 larger in the last dimension.
Why is it not the same size? Any help appreciated.
y# Now make initial (smoothed) map using random phases with Fobs
f_obs_B = f_obs1.apply_debye_waller_factors( b_iso=biso_init)
phases = f_obs_B.random_phases_compatible_with_phase_restrictions(deg=False)
phases_data = phases.data()
e_map_coeff = f_obs_B.phase_transfer(phase_source = phases_data)
e_map = e_map_coeff.fft_map(crystal_gridding = crystal_gridding, symmetry_flags = maptbx.use_space_group_symmetry)
# pick initial envelope
e_map_array = e_map.real_map().as_numpy_array()
cgridding (90, 90, 80)
e_map (90, 90, 82)
George N. Phillips, Jr., Ph.D.
University of Wisconsin-Madison
433 Babcock Dr. Madison, Wi 53706
Phone 713 348 6951 (Houston)
cctbxbb mailing list
cctbxbb at phenix-online.org<mailto:cctbxbb at phenix-online.org>
More information about the cctbxbb