Skip to content

Binoculars tutorial #2 (using GUI)

drnecj edited this page Mar 26, 2015 · 10 revisions

The second part of the tutorial is devoted to the following example: how to use the GUI for visualization of reciprocal space maps.

This tutorial has two parts. In the first part we will continue with the dataset made in Tutorial #1. In the second part, we will visualize in-plane reciprocal space map (kind of 'LEED image' obtained by x-ray diffraction).

First Part

To start, we open the GUI python script.

python /data/id03/inhouse/binoculars/gui.py

On the left side of the window, you see the control panel with all the selection options, on the right you see the plot area. In the control panel there is a selection menu to which you can add your space files.

In File we can:

  1. Start New project
  2. Open existing project
  3. Save project
  4. Import space
  5. Export space

You can add spaces to a project, save project and load project. The project stores the filenames of the spaces that are selected and they will be loaded the moment a saved project is opened. You can start as many projects as you want, switching between them by selecting the tabs.

Export space exports the space with the current settings of the sliders (see below), either to hdf5 or to txt. You can choose which format to export to by changing the extension in the filename. In this way you limit a space to a certain range, and you can project the space onto one or more of its axes. Note: Even if a space is not visualised it still can be exported with the chosen settings. For example a three dimensional space cannot be visualised in the plot area but can be exported with the chosen settings on the slider

Edit menu is for manipulation with HKL spaces. One can Merge and Subtract two spaces. Merge combines all spaces selected in the selection window. First you have to enter the filename where you want to store this new space, and afterwards the new space will be added to the space selection menu. Note: Only spaces that have identical axis labels and resolutions can be merged. Subtract subtracts the space that you open with the dialog that pops up from the spaces that are selected from in the menu. Note: Only spaces that are identical, spaces that have the identical labels, range, and the identical number of contributions can be subtracted

As a first step, we import our CTR space file made in previous tutorial. Note: it is possible to import more spaces at once.

The most important parameters for data visualisation are:

  • projection along axis - this will choose the axis (axes) along which the space will be projected.
  • range sliders. With these sliders you can select the range of the spaces that you want displayed. You can select the range either by moving the bars on the slider or by entering a coordinate in the edit line next to the sliders. The range applies to all spaces that are selected. Note: You cannot simultaneously display spaces with different labels or dimensions, but you can display spaces with different resolutions.
  • The all button resets the range sliders to the extreme values.
  • The slider above the selection menu is for rescaling the color scale
  • log tick changes the colorscale, or the y axis from lin to log.
  • Same intensity range tick forces the same colorscale to all plotted spaces.
  • With the stack and grid radio buttons you can decide if multiple one-dimensional curves should be plotted in the same or in different graphs.

As loaded, the reciprocal space is projected on the HK plane (through L axis) and all the L values corresponding to each HK are summed. In other words, the space is projected along L axis.

We can change the projection to H (or K) axis. Here we can clearly see the profile of the CTR.

If we, for example, select two projection axes as H and K, the result will be an intensity profile along L direction because the space is projected on both KL and HL plane. The H and K range over which intensity values are averaged can be chosen with H and K sliders (or typed directly in the space beside the sliders).

If needed, one can open as many spaces as wanted and visualize them together.

We save the project in File -> Save project

Second Part (in-plane map)

We can add a in-plane reciprocal space map (scan_854-882.hdf5) measured at L=0.3 with dL around .2 in r.l.u.. Note that in the processing, we have chosen the voxel size of L=1, therefore there is no resolution in L direction and the space is 1 voxel thick in that direction. This will limit the overall size of such maps which is acceptable given that we are only interested in the in-plane intensity distribution.

Now, we can zoom in and read out the HK and intensity values of the map. This way we can find precisely the position of diffraction rods.