Opened 5 years ago

Closed 5 years ago

#3270 closed defect (not a bug)

Bfactor sharpening on resampled map

Reported by: olibclarke@… Owned by: Tom Goddard
Priority: normal Milestone:
Component: Volume Data Version:
Keywords: Cc:
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

The following bug report has been submitted:
Platform:        Darwin-19.4.0-x86_64-i386-64bit
ChimeraX Version: 0.93 (2020-04-03)
Description
Hi,

Not sure if this is a bug but it is unexpected behavior:

The bfactor sharpening command (volume gaussian #map bfactor) when applied to any map that has been resampled on a finer grid than the original (e.g. volume resample #2 spacing 0.5), generates a cloud of fine points (see screenshot), whereas the same bfactor applied in the same way to the original map behaves as expected (generating a slightly sharper map).

Cheers
Oli

Log:
> camera ortho

> cofr centerOfView

> alias focus view cofr false

> alias crosshair_on cofr centerofview showpivot true

> alias crosshair_off cofr centerofview showpivot false

> alias symclip clip near -$1 far $1 position cofr

> alias cootmode_wire ~rib; disp; color gold; color byhet; size #* stickradius
> 0.08; volume #* capfaces false style mesh meshlighting false squaremesh
> false color #307fff step 1; surface cap false; lighting flat depthcue true
> depthcuestart 0.2 depthcueend 1.0; graphics silhouettes false; set bgcolor
> black; symclip 15

> alias cootmode_surf ~rib; disp; color gold; color byhet; size #* stickradius
> 0.08; volume #* capfaces false style surface color #307fff3c step 1; surface
> cap false; lighting flat depthcue true depthcuestart 0.2 depthcueend 1.0;
> graphics silhouettes false; set bgcolor black; symclip 15

> alias cootmode_surf_white ~rib; disp; color orange red; color byhet; size #*
> stickradius 0.08; volume #* capfaces false style surface color #002fff3d
> step 1; surface cap false; lighting flat depthcue true depthcuestart 0.2
> depthcueend 1.0; graphics silhouettes false; set bgcolor white; symclip 15

UCSF ChimeraX version: 0.93 (2020-04-03)  
© 2016-2020 Regents of the University of California. All rights reserved.  
How to cite UCSF ChimeraX  

> open "/Users/olibclarke1/Dropbox/chimera
> models/oli_initial.updated_modified_real_space_refined.pdb" format PDB

Chain information for oli_initial.updated_modified_real_space_refined.pdb #1  
---  
Chain | Description  
B | No description available  
D | No description available  
  

> open "/Users/olibclarke1/Dropbox/chimera
> models/resolve_cryoem_2_b_blur_100.mrc" format mrc

Opened resolve_cryoem_2_b_blur_100.mrc, grid size 320,320,320, pixel 0.83,
shown at level 0.0236, step 2, values float32  

> cootmode_wire

Changed 6192 bond radii  

> volume #2 level 0.1842

> symclip 3

> close all

> open "/Users/olibclarke1/Library/Application Support/ChimeraX/0.93/site-
> packages/chimerax/isolde/demo_data/6out/6out.pdb"

6out.pdb title:  
Asymmetric focused reconstruction of human norovirus gi.1 norwalk strain VLP
asymmetric unit In T=3 symmetry [more info...]  
  
Chain information for 6out.pdb #1  
---  
Chain | Description  
A B C | capsid protein VP1  
  

> open 20205 fromDatabase emdb

Opened emd_20205.map, grid size 98,112,104, pixel 1.07,1.07,1.07, shown at
level 0.287, step 1, values float32  

> volume #2 level 0.174

> cootmode_wire

Changed 11622 bond radii  

> symclip 3

> volume #2 level 0.1113

> volume resample #2 spacing 0.5

> cootmode_wire

Changed 11622 bond radii  

> symclip 3

> symclip 5

> symclip 3

> lighting depthCueEnd 0.5

> lighting depthCueEnd 1

> lighting depthCueStart 0

> symclip 3

> volume #3 level 0.1306

Drag select of  

> ui mousemode rightMode clip

> volume #3 level 0.1043

> volume #2 level 0.07989

> volume gaussian #2 bfactor -50

> volume #4 level 0.4006

> volume gaussian #3 bfactor -50

> focus




OpenGL version: 4.1 ATI-3.8.24
OpenGL renderer: AMD Radeon Pro 5500M OpenGL Engine
OpenGL vendor: ATI Technologies Inc.
File attachment: Screenshot 2020-05-20 20.56.53.png

Screenshot 2020-05-20 20.56.53.png

Attachments (2)

Screenshot 2020-05-20 20.56.53.png (1.6 MB ) - added by olibclarke@… 5 years ago.
Added by email2trac
sharpen.png (2.0 MB ) - added by Tom Goddard 5 years ago.
Resampling introduced high frequency Fourier components.

Change History (4)

by olibclarke@…, 5 years ago

Added by email2trac

comment:1 by Eric Pettersen, 5 years ago

Component: UnassignedVolume Data
Owner: set to Tom Goddard
Platform: all
Project: ChimeraX
Status: newassigned
Summary: ChimeraX bug report submissionBfactor sharpening on resampled map

by Tom Goddard, 5 years ago

Attachment: sharpen.png added

Resampling introduced high frequency Fourier components.

comment:2 by Tom Goddard, 5 years ago

Resolution: not a bug
Status: assignedclosed

This is not a bug. I attached an image showing that the resampling adds small high frequency components that are being blown up by the sharpening. Here's a rough explanation -- the resampling does linear interpolation (actually tri-linear). Suppose you half the grid spacing so every two adjacent grid points get a new grid point placed in the middle with the data value equal to the average of its neighbors. Think in 1D, if you had a smooth curve, now you insert extra points with linear interpolation so now every two curve segments make a straight segment and at the original points there is a small sharp corner where two straight segments join. It is those sharp corners (triangle wave) that give the high frequency components.

I tested this with EMD 0632 in the attached image. Using volume fourier command shows interestingly that the fourier components have been set to zero outside a sphere. In fact using volume eraser I erase that sphere, and the remaining fourier components have magnitude of around 1e-13. Then I resample from original grid spacing 0.837 to 0.5 shown in the second row of images are the resampled map, fourier transform, fourier with center sphere erased. Now I see I have high frequency components of magnitude 1e-6 caused by the tri-linear interpolation. The sharpening blows those up.

Maybe a useful capability would be to scale up fourier components out to only a certain radius. That is effectively what I get with the original EMD 0632 which had its components set to 0 beyond a certain frequency. Might be nice to roll off the scaling instead of abruptly drop to 0. The Bfactor sharpening just divides by a Gaussian, scaling the highest frequency components by a huge factor.

Note: See TracTickets for help on using tickets.