About Low pass filtering of maps

Hi,
I’m using the volume tools to low-pass filter a map to 10Å, and it looks like a 10Å resolution map.
Maybe I’m missing something fundamental here and would like help/guidance. What I would like is to keep the high resolution details, but remove the low resolution noise (from 10 to 50Å resolution for example).

Can someone point me in the right direction?
Thanks

Hi @vincent,

It sounds like you are looking for a high-pass or band-pass filter, rather than a low-pass filter. Currently I don’t think there is a way to high-pass or band-pass filter directly in cryoSPARC. There are some options for different ways of filtering a volume using UCSF Chimera’s volume filter, but I’m not sure if any of them are a highpass filter per se. If you’d like, I could show you an example script you could use to apply a highpass or bandpass filter to a .mrc volume using internal cryoSPARC functions through the interactive client, csm icli, just let me know.

Best,
Michael

1 Like

Hi Michael,

yes I would like these tools very much.
Thank you.
Vincent

Hi @vincent,

You can apply a highpass filter to a volume by using the below script. First, run csm icli in a terminal shell connected to the master node of your cryoSPARC instance. Then, replace the commented variables with your volume paths and desired resolutions in the script below, and copy and paste it into the terminal and hit enter.

from cryosparc_compute.blobio import mrc
from cryosparc_compute import fourier, sigproc, geometry

# Replace these with the paths / resolutions desired
in_path = ''  # absolute path to your input volume
highpass_angstrom = 10 # remove frequencies below 10 A
highpass_order = 8 # order of the butterworth highpass filter
out_path = '' # absolute path to write output volume to

hdr, vol = mrc.read_mrc(in_path)
N = vol.shape[0]
psize = hdr['xlen'] / hdr['nx']

highpass_wavenumber = geometry.ang_to_radwn(highpass_angstrom, N, psize)

vol_f = fourier.fft(vol)
highpass_mask = 1.0 - sigproc.lowpass_mask(N, 3, highpass_wavenumber, lowpassorder=highpass_order)
vol_f *= highpass_mask
vol = fourier.ifft(vol_f)

mrc.write_mrc(out_path, vol, psize)

Let me know if you have any further questions!

Best,
Michael

Hi Michael,

It took time for me to figure out that “csm icli” means “cryosparcm icli”.

I now managed to have the script run but I don’t think it is doing what I want:
Instead of removing the frequencies with lower resolution, I think it removes the frequencies lower than 10 Å in the “highpass_angstrom = 10”, which removes the higher resolution data.
I would like to remove the noise, so the higher frequencies, above 10Å, and lower resolution.

Can you help me there?
Thank you
Vincent

Hi @vincent,

I’m not sure I entirely follow – would you like to remove just high frequency detail, just low frequency detail, or both? As well, is this for the purposes of map visualization only, or do you plan on doing additional post-processing after filtering the maps?

If you want to remove just high frequency detail, then the Volume Tools low-pass filter function will do that. You must specify the resolution above which information will be removed (e.g. if you set this to 10 Å as you did in the original post, this means that all information with wavelength < 10 Å will be discarded).

Best,
Michael

Hi Michael,

I want to remove the low resolution signal, the one that appears on maps when we decrease the density level and starts to show tons of low density spots everywhere. But I would like to keep the high resolution information at the same time.
When I use the Volume tools > low pass function at 10Å, it does low pass filtering which looses high resolution details.

What I really wanted to do is keep the high resolution details of trans-membrane regions, while have a “clean/low-pass-filtered” view of the detergent belt.
I guess I can answer my own question by generating the low pass filter map and overaly the high-res and low-pass filtered map.

Thanks
Vincent

Hi @vincent,

I think I understand what you mean now. That “noise” or “dust” that appears in the map (at low threshold levels) is residual noise from the raw image data – it is dispersed throughout all frequency ranges, although it is more prominent at higher frequencies. Low-pass filtering will remove a lot of it, but will also remove high frequency detail, as you’ve noted.

What I would recommend, and what seems to be the best option for what you’re going after, is to use the Local Resolution Estimation job followed by the Local Filter job. A local resolution estimation job attempts to compute a spatial map that associates each point on the map with a resolution value, using a similar method to the short-space Fourier transform based BlocRes protocol, described here. The subsequent Local Filter job generates and applies a non-stationary filter based on the previously computed local resolution map. If it’s working as expected, the local filter allows for the preservation of detail in areas of high-res structure (e.g. the transmembrane region), and the removal of noise in areas where there isn’t high resolution info (e.g. outside of the structure, or in the detergent belt).

The only note about these is that both jobs require a mask, and will thus only compute the resolution map / filter within the mask. Outside of the mask, the volume will be set to zero. Let me know if you have any other questions or run into difficulty with this.

Best,
Michael

2 Likes