prism-em / prismatic

C++/CUDA package for parallelized simulation of image formation in Scanning Transmission Electron Microscopy (STEM) using the PRISM and multislice algorithms
GNU General Public License v3.0
79 stars 39 forks source link

Probe analyzer does not compute difference image in real space correctly #12

Open cophus opened 6 years ago

cophus commented 6 years ago

Difference image in Fourier space looks correct, but in real space there must be some normalization error. See this image using tutorial xyz file as base:

screenshot 2017-12-04 17 42 49
apryor6 commented 6 years ago

The probe images are normalized by the total sum, see below:

https://github.com/prism-em/prismatic/blob/78b2438b92d6322ed3000818baf86b1fe2ca104d/Qt/prism_qthreads.cpp#L217-L227

And then the contrast for the difference image is set based upon the min/max values in the multislice probe

https://github.com/prism-em/prismatic/blob/78b2438b92d6322ed3000818baf86b1fe2ca104d/Qt/prismmainwindow.cpp#L1511-L1527

Where the pixel color is determined by linearly interpolating from the colormap

https://github.com/prism-em/prismatic/blob/78b2438b92d6322ed3000818baf86b1fe2ca104d/Qt/prism_colormapper.cpp#L10

It does look like something is amiss in the image you attached, however. Hmm

alex-rakowski commented 3 years ago

check QT-window