[Chimera-users] gaussian filter

Tom Goddard goddard at sonic.net
Mon Apr 30 10:49:28 PDT 2012


Hi Mike,

   g.step is a 3-tuple giving the grid plane spacing, for example g.step 
= (3.5, 3.5, 3.5) means the grid planes are separate by 3.5 Angstroms 
along x,  y, and z axes.  The line of code you are looking at converts 
the Gaussian linewidth in Angstroms to grid index units.  The g variable 
holds a Grid_Data object defined in

     share/VolumeData/griddata.py

The code that actually calculates the Gaussian filtering is

     share/VolumeFilter/gaussian.py

It does a convolution with a Gaussian using a Fourier transform to speed 
it up.  It can do cyclic or non-cyclic convolution -- meaning the map is 
considered to be periodic or not periodic.  This effects filter results 
near the edge of the map.  In the cyclic case the Gaussian centered near 
an edge wraps around to the opposite map box edge.  For the non-cyclic 
case it behaves as if the map is zero outside its box.  The code uses 
the Python numpy library to do the Fourier transforms and uses efficient 
FFT sizes since this can make an large difference (10x) in the speed 
with powers of 2 generally being best.  Let me know if you want more 
explanation -- I wrote that code.

     Tom


> Hi,
>
> I've been using the gaussian filter for a number of years to help me display my noisy data.  I'd like to understand what it's doing a bit better, and so I need help with the following code:
>
> ijk_linewidths = map(lambda step: linewidth / step, g.step)
>
> what is the resulting length of ijk_linewidths?  I can't seem to figure out what type of data type g.step is.  Is it a feature of the image itself, or where does it come from?
>
> Best Regards,
>
> mike
>
>
>
> _______________________________________________
> Chimera-users mailing list
> Chimera-users at cgl.ucsf.edu
> http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
>





More information about the Chimera-users mailing list