Dear xrayutilities-users,
recently I implemented a new way of visualizing reciprocal space maps which
might be useful for several of you so I decided to post a small explanation
here.
For the visualization of reciprocal space maps the irregularly spaced
experimental data are often "gridded" onto a regular grid. Although this
sometimes causes problems [1] its often simply necessary.
Especially when any loss of resolution is to be avoided the grid density has to
be chosen at limiting values which often cause artifacts in the data. Such
artifacts are for example seen in the left most panel of the attached figure.
To make this process more smooth I implemented something I call
"fuzzy"-gridding. For the 1D case thats described in the appendix of an
article about powder diffraction we published earlier this year [2]. The basic
idea is to mimic better the experimental conditions in which every data point
is actually not a mathematical point but has to be considered to have some
extension due to the limited experimental resolution. Considering this
resolution in the gridding process by distributing data points fractionally on
multiple grid points on can avoid the girdding artifacts very easily (see
middle panel of the attached figure).
For comparison the figure also shows the visualization with a matplotlib
function 'pcolormesh' which in certain cases allows to avoid gridding
all-together. see its documentation for details [3].
The code and data to generate the attached image can be found in the example
directory of xrayutilities (see GIT master [4]). Fuzzy gridding functions are
now available for 1D, 2D and 3D gridders and will be inlcuded in the next
release of xrayutilities.
Any feedback is welcome!
cheers
dominik
[1] https://sourceforge.net/p/xrayutilities/mailman/message/32836996/
[2] http://scripts.iucr.org/cgi-bin/paper?S1600576715003465
[3] http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.pcolormesh
[4] https://sourceforge.net/p/xrayutilities/code/ci/master/tree/examples/xrayutilities_fuzzygridding.py
|