NAME#

eldix - data collection and processing with the ELDICO electron diffration system

SYNOPSIS#

eldix [ -a|--api ] [ -A|--attocube ] [ -b|--box BOXSIZE ] [ -c|--colorscheme SCHEME ] [ -D|--detector HOSTNAME[:port] ] [ -E|--ebeam HOSTNAME[:port] [ -f|--fit ] [ -g|--geometry [WxH][+X+Y] ] [ -h|--help ] [ -H|--hw ] [ --http HTTPPORT ] [ -I|--imageviewer ] [ -i|--infile file ] [ -k|--key license_key ] [ -l|--load file ] [ -L|--loglevel LEVEL ] [ -m|--method METHOD ] [ -O|--octagon ] [ -P|--process ] [ --project DIR ] [ --raw WxH[[xBPP]+OFF] ] [ -s|--scaling linear|square|log|cubic|fwhm ] [ -S|--special Undocumented special options ] [ -t|--tcpport TCPPORT ] [ -T|--dettyp NAME ] [ -U|--userPolicy none|relaxed|strict ] [ -v|--verbose ] [ -V|--VERSION ] [ -x|--xy [x,y] ] [ -z|--zmq ZMQPORT ] [ filename ]

DESCRIPTION#

eldix is a Python / Tk based graphical user interface for data collection and processing of the ELDICO electron diffraction system. It drives the following hardware components:

  • eldix: electron beam generation system (E-beam)

  • eldix: the octagon goniometer

  • eldix/mar: Dectris detectors with EIGER2 API like QUADRO or ELA

The program features an image display and analysis tool and supports a variety of image format like cbf, minicbf, mar345, tiff, raw integer arrays, etc. The program also comprises a complete interface for data processing with the DIALS data processing package.

OPTIONS#

-a|--api API

API version to use for communicating with Dectris detectors. Default is: 1.8.0

-A|--attocube

Enable/disable support of Attocube goniometer if disabled/enabled in configuration file.

-b|--box BOXSIZE

Integration box size to be used when pressing the center mouse button in an image. Default is 25 pixels in x and y.

-c|--colorscheme

grey|blue|rainbow Colorscheme to use. Default is: grey

-d|--debug FLAG

Flag for activating undocumented debug statements. Default: 0

-D|--detector HOST[:PORT]

Hostname (and optional port) for Dectris detector, e.g. quadro:80. Command line has precedence over entry in configuration file. Default is: None:80

-E|--ebeamHOST[:PORT]

Hostname (and optional port) for Ebeam system, e.g. ebeam:4944. Command line has precedence over entry in configuration file. Default is: None:4944

-f|--fit

Adjusts the size of the image display area such that it fits the screen.

-g|--geometry [W[xH]][+X+Y] | full | max

Gives the initial geometry of the eldix window. You may specify the width (W) and optionally the height (H) of the window as well as the coordinates X and Y of the upper left corner. It is useful to set an alias to eldix with a certain default geometry depending on your window manager. With option \"full\" the program starts in fullscreen mode, i.e. with all windows decorations removed. With option \"max\", the program starts in maximized mode.

-h|--help

Prints a summary of program command line options.

-H|--hw

Ignore all hardware connections regardless of entries in configuration file.

--http PORT

Start a HTTP server listening on port PORT and accept commands via a REST API. See below for details. Default: 0 (ignore)

-I|--imageviewer

Use the program as image viewer only. All hardware interfaces will not be initialized and will not be available. Also, the processing options will not be present. Safes many resources and is a good way to use the program as simple image viewer.

-k|--key KEY

License key to run the program.

-i|--infile FILE

Loads image file FILE at startup.

-L|--loglevel LEVEL

Set the loglevel to DEBUG,INFO,WARNING,ERROR or CRITICAL. The default level is INFO. When using level WARNING, only messages marked as WARNING or ERROR will be printed, so the program will become pretty mute, while with level DEBUG the program may become chatty. The log level affects both the log file and the standard output. Default is: INFO

-l|--load FILE

The program periodically looks for file FILE. If available, the file is read. This ASCII file may contain lines with a filename specifying an image file to be loaded. If the given file exists, it is loaded.

-m|--method)

crystal|powder|texture Depending on the method chosen the left mouse button plots simple cross-sections (crystal), radial integrals (powder) or the values along a circumference (texture). Default is: crystal. For details, see section LINE.

-O|--octagon

Disable/Enable support of OCTAGON goniometer if enabled/disabled in configuration

-P|--process

Disable/Enable the processing interface if enabled/disabled in configuration file.

<!-- -->
--project DIR

Master directory of projects. This will override the project directory given in the configuration file. If DIR does not exist, the project management will not be available in the program.

<!-- -->
-r|--raw) WxH[xBPP][+OFF]

Specification for raw binary array with width W, height H, optional bytes per pixels BPP and optional offset to skip the first OFF bytes of the file. -s|--scaling linear|square|log|cubic|fwhm Choice for scaling colors to pixel values. See section COLORS for details. Default is: linear.

-t|--tcpport PORT

The program starts a TCP/IP-server on port PORT. On this port, simple commands may be given. For details, see section TCP/IP-SERVER. Default: 40404 (0=ignore)

-T|--dettype NAME

Type of detector, e.g. eiger, Pilatus3, mar345 Default is: eiger

-U|--userPolicy

Sets a policy for being able to run the program. The command line overrides the entry in the configuration file. For detils, see section USERS.

-v|--verbose

Increases verbosity level for more program output.

-V|--VERSION

Only show program version and exit.

-x|--xy [X,Y]

Gives the initial position of the eldix window. X,Y specify the the coordinates of the upper left corner. Default: decided by window manager.

-z|--zmq PORT

Open port for streaming data from detector (Dectris detectors only). Command line has precedence over entry in configuration file. Default is: 9999

filename

The program loads the image \"filename\". See section INPUT FILE for a description of currently supported image formats.

MAIN WINDOW#

The main window controls the most important display functions. If consists of the following areas:

Menubar:

see sections FILE MENU, VIEW MENU, STEM MENU, PROCESS MENU and HELP

<!-- -->
Toolbar:

The toolbar is located on the left hand side of the main window and shows a variety of pushable icons. They switch between the main pages of the application window. See section TOOLBAR.

<!-- -->
Notebook:

Fills the area between the toolbar and the right hand side of the main window. It offers a so called \"Notebook\" with several pages. The available pages depend on configuration parameters and command line switches. See section NOTEBOOK.

<!-- -->
Statusbar:

The statusbar is located at the bottom of the main window and stretches from left to right. See section STATUSBAR.

Displayed coordinates are always with the origin in the lower left corner, x being the horizontal axis (running from left to right) and y being the vertical axis (running upwards).

FILE MENU#

The \"File\" menu can be obtained by pressing the \"File\"-button in the menubar of the main window. The following choices are offered:

Change user:

Switches to the user selection window. This option is not available if user policy is set to \"none\". Shortcut: CTRL+\'u\'. See USERS.

Project:

Switches to the project selection window. This option is not available if projects are disabled or if the master project directory does not exist. Shortcut: CTRL+\'j\'. See PROJECTS.

Open:

Pops up the \'File selection\' window. Shortcut: CTRL+\'o\'. See OPEN FILE.

Tools: xtal:

Fast tool to index a single image. Shortcut: CTRL+\'x\'. See TOOLS: XTAL

Tools: powder:

Tool to process a powder diffraction image in order to obtain center and distance. Shortcut: CTRL+\'p\'. See TOOLS: POWDER

Camera:

Pops up the \'Camera\' window. Shortcut: CTRL+\'m\'. Only available if a camera is configured. See CAMERA. Quit: Quits program. Shortcut: CTRL+\'q\'.

VIEW MENU#

The \"View\" menu can be obtained by pressing the \"View\"-button in the menubar of the main window. The following options can be set:

Colors:

Pops up the \'Color\' window. Shortcut: ALT+\'c\'. See COLORS.

Save image:

Pops up the \'Save\' window. Shortcut: ALT+\'i\'. See SAVE.

Save area:

Pops up the \'Save\' window. Shortcut: ALT+\'a\'. See SAVE.

Image header:

Pops up the \'Image Header\' window. Shortcut: ALT+\'h\'. See HEADER.

<!-- -->
Follow data collection:

When the program is collecting data, incoming images will automatically loaded if this option is set. For very short exposure times there is little time to interact with the images. If you want to do that, deselect this option and images will not longer be updated automatically. Shortcut: ALT+\'d\'

<!-- -->
Show/Hide resolution rings:

The center of diffraction can be set in the \"Header\"-window (see HEADER). Shortcut: ALT+\'r\'

<!-- -->
Keep view:

When loading a new image, the image will be drawn in exactly the same way as the previous image (see COLORS). Shortcut: ALT+\'v\'

<!-- -->
Keep colors:

When loading a new image, the image will be drawn with the same color thresholds as the previous image (see COLORS). Shortcut: ALT+\'k\'

<!-- -->
Reset colors:

Recalculate best color thresholds from image histogram (see COLORS). Shortcut: ALT+SHIFT+\'c\'

<!-- -->
Integrate area:

Integrates the image area displayed in the window and dumps statistics in upper left corner of screen. Shortcut: ALT+SHIFT+\'i\'.

<!-- -->
Refine center:

The primary beam in the ELDICO system is not blocked by a beam stop. It is therefore usually straightforward to determine the origin of diffraction by determining the position of the primary beam. Since the electron beam position be moved around by applying current to lenses, it is possible that the primary beam position does not remain stable over longer periods of time. To help finding the actual primary position, a beam center refinement is available that will refine the beam within 10 pixels of search radius around the current beam center position or by clicking into the desired part of the image. If successful, the refinement ends with asking the user if she/he wants to update the entire current dataset with the refined beam position. Shortcut: ALT+SHIFT+\'r\'.

<!-- -->
Fit window to screen:

Makes image display area large enough to fit the shortest dimension of the screen. Shortcut: ALT+SHIFT+\'f\'.

<!-- -->
Full image:

Zooms out image to fit entirely into current window size. Shortcut: ALT+\'f\'.

<!-- -->
Zoom in:

Zooms one step (x 2) into image. The current zoom ratio is shown in the leftmost field of the statusbar. Shortcut: ALT+\'+\'.

<!-- -->
Zoom out:

Zooms one step (x 0.5) out of image. The current zoom ratio is shown in the leftmost field of the statusbar. Shortcut: ALT+\'-\'.

<!-- -->
Next:

Loads next image in current directory (alphabetical order). Shortcut: \'Right arrow key\'.

<!-- -->
Previous:

Loads previous image in current directory (alphabetical order). Shortcut: \'Left arrow key\'.

<!-- -->
Play forward:

Keeps loading consecutive images in ascending alphabetical order in current directory. To stop, choose either \'Next\' (->) or \'Previous\' (\<-) from the Options menu. Shortcut: \'Up\'.

<!-- -->
Play backward:

Keeps loading consecutive images in descending alphabetical order in current directory. To stop, choose either \'Next\' (->) or \'Previous\' (\<-) from the Options menu. Shortcut: \'Down\'

<!-- -->
Delay between loads:

Choice of adding a waiting time when continuously loading images. By default, the images will be loaded as fast as possible.

<!-- -->
Show 2D contours:

For zoom factors >= 4, a contour plot of the displayed area is shown in a separate window. The program makes use of python\'s built-in plt utility. Note: this option may take some CPU-time. Shortcut: Shift+\'F2\'.

<!-- -->
Show 3D:

For zoom factors >= 4, a 3D-plot of the displayed area is shown in a separate window. The program makes use of python\'s built-in plt utility. Note: this option may take some CPU-time. Shortcut: Shift+\'F3\'.

STEM MENU#

This menu only becomes visible if the program runs with support for the E-Beam system. The menu controls a couple of options for displaying STEM images. The STEM image viewer, however, is a subpage of the the Octagon page in the main notebook rather the E-beam page, because of close interactions with goniometer motors. Please see NOTEBOOK:STEM below for more details.

The \"STEM\" menu can be obtained by pressing the \"Stem\"-button in the menubar of the main window. The following items are available:

Find tip of pin

When looking at a STEM image with a pin, program stemfind is capable of locating the tip of the pin. By choosing the option, the program is called. Shortcut: CTRL+SHIFT+\'n\'

<!-- -->
Find center of particle

When looking at a STEM image with a particle, program stemfind is capable of locating the center of it. By choosing this option, the program is called and calculates by how much the goniometer motors have to be moved. Shortcut: CTRL+SHIFT+\'p\'

<!-- -->
Manual pick x,y in last series

After shooting a series of STEM images at certain PHI intervals, the program determines on how much to move the goniometer motors to drive the particle into the center of rotation. This calculation depends on program stemfind to accurately determine the center of the particle in each individual image of the series. This does not always work reliably. By choosing this option, you can easily go through all images collected in the current series and choose the center of the particle by clicking into the desired position in the image. If all images of the series are thus handled, the program calculates the corrections based on the selected positions. Shortcut: CTRL+SHIFT+\'m\'

<!-- -->
Open

Opens up a window to load a new STEM data file. Shortcut: CTRL+SHIFT+\'o\'

<!-- -->
Save

Opens up a window to save the current STEM image as graphics file in \"png\"-format. Shortcut: CTRL+SHIFT+\'s\'

<!-- -->
Next

Loads next STEM file (based on alphabetical order). Shortcut: CTRL+SHIFT+\'PageUp\'

<!-- -->
Previous

Loads previous STEM file (based on alphabetical order). Shortcut: CTRL+SHIFT+\'PageDown\'

<!-- -->
Zoom in

Zoom into currently loaded STEM image. Shortcut: CTRL+SHIFT+\'+\'

<!-- -->
Histogram

Computes a pixel value distribution of the current STEM image. A histogram helps to find suitable values for color distributions of the STEM image. Typically, colors of the currently selected color scheme should be chosed between 0 and the right hand end of the histogram where the population of the value bins drops towards 0. Shortcut: CTRL+SHIFT+\'h\'

<!-- -->
Reset colors

Recomputes colors for the currently loaded STEM image based on the histogram. The min. and max. values of the color distribution will be filled in automatically. Shortcut: CTRL+SHIFT+\'r\'

<!-- -->
Adjust colors

Allows for setting brightness, contrast and saturation of loaded STEM images. Shortcut: CTRL+SHIFT+\'c\'

<!-- -->
Plot series

When collecting a series of STEM images, at the end of the series the program will try to follow a given particle in the field of view and automatically detect the x,y-coordinates of the centre of this particle. Those coordinates will be shown in a 2D-plot at the end of the series. If the window showing that plot has been closed, you will get back the latest plot using this option. Shortcut: CTRL+SHIFT+\'p\'

<!-- -->
Solid background under text

When loading STEM images, image information is drawn on the right hand side of the image. The text color depends on the chosen colorscheme but can be sometimes difficult to read. By applying a solid background the text becomes easily readable, but it will make that part of the STEM image invisible. Shortcut: CTRL+SHIFT+\'b\'

<!-- -->
Shoot diffraction image after single STEM

Option to automatically shoot a diffraction image after each single STEM image. Shooting a diffraction image will take a couple of seconds. This may be considered as a rarely used option. Shortcut: CTRL+SHIFT+\'b\'

<!-- -->
Store/retrieve coordinates of particle

Opens the popup window which lets you store and retrieve coordinates of particles. This can also be done by pushing the diskette icon in the upper left corner of the STEM image area. Shortcut: CTRL+SHIFT+\'z\'

<!-- -->
Fill particles

When finding particles in a mesh, it is possible to fill the area of the particles located by program stemfind. You will thus get an impression of the contours of the particles as identified by stemfind. Shortcut: CTRL+SHIFT+\'f\'

PROCESS MENU#

This menu only becomes visible if the program runs with support for data processing. The \"Process\" menu can be obtained by pressing the \"Process\"-button in the menubar of the main window. The following items are available:

Load params from ...

Processing parameters are stored as dictionary in the common \"json\"-format. All the settings on the Process pages will end up here. If you have successfully processed data, you may want to store those settings in the directory containing the processing file. If those settings have been stored in a json-file, here is the place where you can load them back into the GUI.

<!-- -->
Save process params

Opens up a window to save the current processing parameters into a json-file. See comments above.

<!-- -->
Exclude areas

On diffraction images, there can be areas that are systematically covered or otherwise inaccessible to diffraction. It usually is beneficial to tell the data processing programs which areas of a detector cannot be trusted, so diffraction data in those areas will not be integrated at all. When using this button, a window will pop up. In this window you may define different types of untrusted areas, e.g. resolution threshold, gaps between detector modules (Dectris), ice rings, circles, rectangles or polygons. When entering values, you will get a visual feedback on the image page but only if an image is loaded. For each of the exclusions that you have defined, you can choose if you actually want to apply that setting (\'Use\') and also if you want to show it in the image area or not. If you have defined multiple exclusions, showing them all may look somewhat messy. Try it out if you like.

<!-- -->
Show results in webbrowser

When processing data, the results of each processing step can be displayed in a nicely readable form in a webbrowser. This is done automatically but can be controlled by selecting or unselecting this option. Shortcut: CTRL+SHIFT+\'w\'

<!-- -->
Show spots

When processing data, certain program steps generate spot files (e.g. from peak search or from integration). Those spots will be automatically overlaid on the current image. Here, you may turn this feature on or off. Shortcut: CTRL+SHIFT+\'q\'

HELP MENU#

The \"HELP\" menu can be obtained by pressing the \"Help\"-button in the menubar of the main window. The following items are available:

Man page: ...

Displays the selected Unix-style man page in a web browser.

<!-- -->
Upgrade

Opens a window that shows the current version in use and the latest available version. Please note, that this functionality requires the program to have internet access since it retrieves information from a download site on the internet.

<!-- -->
About

Shows the current program version.

TOOLBAR#

The toolbar is on the left hand side of the main window and shows a varying number of pushable icons depending on the main \"pages\" of the \"NOTEBOOK\" (see below). Pushing the icon is equivalent to pushing the main tab buttons in the notebook area further to the right. See section NOTEBOOK for more details.

STATUSBAR#

The statusbar is at the lower border of the main window and shows several fields that will automatically be filled with values once an image has been loaded:

Zoom:

Displays the magnification level of the current image

Min/max:

Input text fields for the minimum and maximum color level (see below)

Pixel coordinate and value:

Displays the x,y-coordinates and the value of the pixel underneath the pointer.

Resolution in Ang. and 2-theta:

Displays the resolution and 2-theta value of the pixel underneath the pointer.

If the program runs with support for Dectris detectors, you will find 2 additional fields on the right hand side of the status bar:

Humidity:

Gives the percentage of humidity as measured by the Dectris detector. Please note, that if the humidity inside the detectors becomes > 25%, the detector will close down its electronics for self protection. For the humidity to come down to \< 25% you will need to flood the detector with dry air or nitrogen.

Temperature:

Gives the temperature inside the Dectris detector. Should be \< 35 deg. C.

NOTEBOOK#

The notebook is the area between the toolbar and the right border of the main window. Depending on configuration and command line switches, it presents the main work areas of the application, the \"pages\". By clicking the named tab buttons, you can switch between pages. This is equivalent to pushing the corresponding icons in the toolbar. Available pages are:

  • Image: - visualization and analysis diffraction images. See section NOTEBOOK:IMAGE below for more details. This page is always available.

  • E-beam: - control and monitoring of the E-beam generation system. See section NOTEBOOK:E-BEAM below for more details. This page is available only when giving a hostname and port number for the E-beam controller on the command line or in the configuration file.

  • Octagon: - control and monitoring of the \"Octagon\" goniometer system. See section NOTEBOOK:OCTAGON below for more details This page is available onlywhen giving a hostname and port number for the octagon controller on the command line or in the configuration file.

  • Collect: - set up and run a data collection. See section NOTEBOOK:COLLECT below for more details. This page is available only when giving a hostname and port number for the electron diffraction detector on the command line or in the configuration file.

  • STEM: - collect and view STEM images. See section NOTEBOOK:STEM below for more details. This page is available only when giving a hostname and port number for the electron diffraction detector on the command line or in the configuration file.

NOTEBOOK:IMAGE#

The \"Image\" page shows diffraction images in a variety of formats. You can perform multiple analysis operations on the images, zoom in, zoom out, integrate areas, lines, powder rings and textures. You can show 2D or 3D plots and change the colors of the images. When loading, the program tries to choose suitable color ranges, but you can modify them by hand if desired. During data collection, the images are automatically displayed in this area while they are coming in. The \"Image\" page features an additional toolbar on the right hand side. See the following sections for more details. All 3 mouse buttons have specific functions when pushed in the image area. See section NOTEBOOK:IMAGE:MOUSE ACTIONS below.

NOTEBOOK:IMAGE:MAGNIFICATIONS#

To change magnification factors, select the \"Full Image\", \"Zoom in\" or \"Zoom out\" items from the \'Options\' menu or use the corresponding key accelerators. Available magnifications factors are 0.25, 0.5, 0.75, 1, 2, 4, 8, 16, 32, 64 and 128, where 1 means: 1 pixel on the screen is 1 pixel in the image. If the full image fits within the window, no further demagnification will be achieved. The current magnification level is shown in the leftmost field of the statusbar in the lower left corner of the main window.

NOTEBOOK:IMAGE:MOUSE ACTIONS#

By dragging the mouse across the image area, the current pixel coordinates and its pixel value is shown in the statusbar at the bottom of the window. The origin of the image is the lower left corner.\ By pressing and/or releasing one of the 3 mouse buttons specific functions are triggered depending on the magnification level.

Left mouse button:

Draws a line from point A to point B and displays the pixel values along that line in a separate window (see NOTEBOOK:IMAGE:LINE). This works for all magnification levels. Instead of a line, a circle might be painted. This depends on the choice of line mode in the window that is popping up: CRYSTAL, POWDER or TEXTURE (see section LINE below).

<!-- -->
Center mouse button:

The contents of a box (red) around the cursor is integrated. The minimum, maximum, sum, average and sigma of the pixels contained in the red box will be displayed in the upper left area. The size of the integration box may be changed on the command line or the configuration file.

<!-- -->
Right mouse button:

While dragging the mouse, a box is drawn from cursor position A to position B. If the mouse button is released, the image area within that box will be displayed in the same window with the corresponding magnification factor. If the mouse button is only pressed shortly, at magnification levels > 1, the image will be recentered around the mouse pointer position. Otherwise, when dragged, the zoom level will be further increased.

NOTEBOOK:IMAGE:LINE#

There are 3 different types (methods) of drawing plots: he method can be chosen on the command line or from a menu in the \'Line\'-window.

Crystal:

Draws a straight line from the position of the left mouse button press to the position of the left mouse button release. If the line width is larger than 1, the interpolated values of neighbouring pixels are summed up and averaged.

<!-- -->
Powder:

Draws a circle centered at the position of the left mouse button press with a radius corresponding to the position of the left mouse button release. The resulting plot shows the average intensities of all pixels along the circumference of a ring at a given radius starting at the mouse button press with a radius of 1 pixel and ending at the mouse button release with a radius corresponding to the distance between mouse press and release.

In this mode, only a line width of 1 is allowed.

This mode is called \"Powder\" mode since in powder diffraction one typically looks at integrated intensities of powder rings. Reflections show up as peaks in the \"powder diffraction plot and can easily be integrated.

Textures:

Draws a circle centered at the position of the left mouse button press with a radius corresponding to the position of the left mouse button release. The resulting \"texture\" plot shows the intensities along the circle circumference. If the line width is larger than 1, the interpolated values of neighbouring pixels are summed up and averaged.

This mode is called \"Texture\" mode since in texture analysis one typically looks at intensity variations (modulations) along the circumference of diffraction rings.

For each plot type one can use the left mouse button for selecting the starting and the ending point of the plot. However, one can also fix the starting point of the plot as well as the ending point. It is certainly useful in \"Texture\" or \"Powder\" mode to set the starting point to the center of diffraction. The values may be entered manually in the \"[x,y] at start\"-fields. You must select the \"Fix\"-button on the right hand side of those fields to fix the coordinates, otherwise by pressing the left mouse button always the current x,y-coordinates are entered automatically. In \"Single Crystal\"-mode one can set the ending coordinates by fixing the \"[x,y] at end\" and entering the desired x,y coordinates.

In any case, plots can be obtained by pressing the left mouse button in the image area of the display window.

One can save the contents of the current plot as ASCII file by pressing the \"Save as TXT\"-button in the \"Line\" window. The contents of the ASCII file are \"length in pixels,interpolated intensity\", one line per value in C-format %10d%1.2f). The origin is in the lower left corner, x is horizontal, y vertical. The file name is set automatically as \"line.x1,y1_to_x2,y2.txt\" where x1,y1 and x2,y2 are the starting and ending coordinates of the plot, respectively.

One can also save the contents of the current plot as graphics file by pressing the corresponding button in the \"Line\" window. The graphics file is in \"png\" format and the output file name will be is \"line.x1,y1_to_x2,y2.png\".

When working in \'Powder\'-mode and \'Texture\'-mode, the output files will ne named \'radius.x,y_r=R\' and \'circle.x,y_r=R\', respectively, where x,y are the center coordinates of the circle and R the radius.

Line width:

The width of lines of a cross-section usually should be 1 pixel, but you are allowed to increase this number if not working in \"Powder\"-mode.

COLORS#

By default, 256 colors are distributed in equidistant intensity bins between a minimum (Min) and maximum (Max) value. All pixel values > Max are drawn in black and all values \< Min in white (greyscale mode). Min usually is 0, but Max is calculated such that 99.998 % of all pixels in the image have intensities \<= Max. The Min and Max can be entered in the Min/Max field in the statusbar of the image display window (lower side of window) or in the \"Colors\"-window which can be obtained by selecting the \"Colors\" option in the \"File\"-menu or by typing \"c\". In the \"Colors\"-window, the histogram of the pixel values in the image is displayed, i.e. the intensity of a pixel versus its frequency. In the histogram plot, two dashed bars mark the Min and Max values. To change Min or Max, enter values in the corresponding fields (and press RETURN!).

To change color schemes, select \"Greys\" or \"Blues\" or \"Rainbow\".

To change the way the pixel values are scaled to colors, choose one of \"Linear\", \"Square\", \"Cubic\", \"FWHM\" and \"Logarithmic\".

OPEN FILE#

This window allows for selection of an image file to be displayed. In the \"Name\" listing a file may be selected by pressing the left mouse button. A double click is equivalent to pressing the \"Open\" button.

The program automatically determines wether a selected file is an implemented image format and loads the files accordingly. See section INPUT FILES for a list of implemented formats.

HEADER#

This window is used mainly for setting parameters affecting the cross-section plot but also has input fields for distance, wavelength and phi as well as choices affecting the size of the integration box in the image display area.

Distance, wavelength, pixelsize, 2-theta, PHI-start, Delta-PHI:

The values are usually taken automatically from image headers. If these values are missing or just wrong, the values may be given here. They are needed for correct calculation of the resolution rings and/or display of spot files. When an image is loaded, the entries found in the image header will always update the values given here, unless the \"Fix\"-option is set.

<!-- -->
x-center and y-center:

By default, the values for the center of diffraction will be taken from image headers. In many cases, there will be dummy values only corresponding to the actual center of the image. The values given for the center of diffraction affect only the display of resolution rings.

SAVE WINDOW#

This window is used for writing complete or partial images out to disk in png format. To save only the portion of the image displayed in the main window, choose \'Save area\' from the \'File\' menu. Otherwise, choose \'Save entire image\'.

CAMERA#

The camera window is available only if there are cameras configured, either USB or IP cameras or STEM cameras (see eldix.cfg(1) for defails). The window can be opened by choosing menu option \"Camera\" from the \"File\" menu or by typing CTRL+m. The window features 1 or more pages with video streams from configured sources. While USB and IP camera sources are conventional video cameras that deliver a stream of video frames, STEM cameras are different. For STEM, the electron beam is moved over a desired area of the sample. For each position of a 2D grid, special detectors (so called \"bright\" and \"dark\" field detectors) close to the sample record a signal that eventually is being assembled to a 2D picture of the sample. The result is a raster electron microscope image of the sample at much higher resolution than a light microscope would be able to deliver. Nanocrystals can be difficult to find and center with a light microscope. The drawbacks of using the electron microscope mode (\"STEM\") is that the achievable frame rates depend on the number of raster points and thus from the area to be covered. Frame rates are much lower than for typical video cameras (30 fps): typically close to 1 fps. Also, one has to keep in mind that the electron beam is capable of producing radiation damage. Unstable samples that are very susceptible to radiation damage might suffer before the data collection even has started!

SAMPLE CENTERING#

Sample centering is possible in different ways:

  • by moving the relevant motors of the goniometer to specific values

  • by opening the \"Camera\" window and pointing with the mouse to the desired position (point & click)

  • by pushing the arrow buttons (up,down,left,right) in the \"Camera\" window

\ Point & click centering is the most convenient and fastest way to move a sample around the microscope view. You may use the left hand or right hand mouse button to select the target position. However, when using the left hand mouse button a pop up window asks for confirmation, while a click with the right hand mouse button will directly move motors to the target position. The translation between pixel coordinates of the video frame and actual motor movement makes use of the pixel coordinates of the selected point and the coordinates of the crosshair that supposedly marks the intersection between the electron beam and the pivot point of the sample.

NOTEBOOK:E-BEAM#

The \"E-beam\" page is available only if the program starts with support of the E-beam system, i.e. by connecting to the TCP/IP-server of the the E-beam system at the given hostname and port. The NOTEBOOK:E-BEAM page features 1 subpage:

  • Control - see NOTEBOOK:E-BEAM:STATUS

NOTEBOOK:E-BEAM:STATUS#

On this page, you can select several operation modes of the E-beam system. Full control of the E-beam system is only available through the manufacturers interface. However, the most common user functions are available from within this program. You can choose betweeen:

  • turning off the E-beam system

  • venting the E-beam system

  • going into low power (standby) mode

  • going into full power diffraction mode

  • going into STEM mode and obtain raster microscope images of the sample

Here you can also open the beam shutter and you can monitor the most relevant sensors and settings of the E-beam system.

NOTEBOOK:OCTAGON#

The \"Octagon\" page is available only if the program starts with support for the Octagon system, i.e. by connecting to the server of the the Octagon system at the given hostname and port. The \"Octagon\" page features 2 subpages:

  • Motors - see NOTEBOOK:OCTAGON:MOTORS

  • Camera - see NOTEBOOK:OCTAGON:CAMERA

NOTEBOOK:OCTAGON:MOTORS#

On this page, you can drive motors of the goniometer and see their current positions. The OCTAGON goniometer features 5 motors:

  • Gonio:X - horizontal movement of the entire rotation axis, perpendicular to E-beam

  • Gonio:Y - vertical movement of the entire rotation axis, perpendicular to E-beam

  • Sample:Z - horizontal movement of the sample in direction of E-beam

  • Sample:X - horizontal movement of the sample in perpendicular to E-beam

  • Gonio:Phi - rotation of the sample around E-beam

  • STEM detector - drive the STEM position in (to allow STEMs) or out (to allow diffraction images. This normally happens automatically, so typically there is not need to do this manually.

There is a LCD-style area for each motor that shows the current position of the motor in degrees for Gonio:Phi and in micron for all others. Above the current readings the possible range of movement is shown.

When clicking into the LCD area with the left mouse button, a window pops up which allows for setting a new target position and move the motor to this position.

When clicking into the LCD area with the right mouse button that window does not pop up. Instead, the motor drives directly depending on where the mouse button has been pressed. When pressing the mouse left of the center of the LCD area, the motor drives to smaller values. When pressing the mouse right of the center of the LCD area, the motor drives to larger values. The amount driven cannot be at most 100% of a predefined movement depending on the distance of the actual mouse click and the center of the area. A typical settings for predefined movement for Gonio:Phi would be 10 degrees. If the right mouse button is clicked close to the right hand edge of the LCD area, the Phi-axis would then drive by +10 degrees. It would drive by only 5 degrees if the mouse is clicked half way between the center of the area and the right hand edge.

NOTEBOOK:OCTAGON:CAMERA#

On this page, you can will see the sample with the microscope camera. Due to limitations of light microscope, you will have difficulties to clearly see samples of a nanometer scale. This is why for fine tuning of sample positions you will switch later on to STEM imaging. But for finding suitable samples on a grid and for doing large scale adjustments you should rather use this microscope camera since it doesn\'t produce radiation damage.

The window features a main area that shows the video stream of the microscope. On the right hand edge of the window you will find 6 buttons that will drive the sample up and down. On the top edge there are 6 more buttons that will drive the sample left or right. On the right hand edge there are 6 buttons that will drive the PHI axis by 1, 30 or 90 deg.

The intersection of rotation axis and beam is marked by a cross-hair. The position of the cross hair can be adjusted using the input fields for x and y below the video area.

  • left mouse click - a window pops up that asks for driving the goniometer motors Sample:X or Sample:Z (depending on Gonio:Phi) and Gonio:Y so that the position where you clicked will move into the intersection of the cross-hair.

  • middle mouse click - as above, but motors drive directly without asking.

  • right mouse drag - zoom into the area spanned by the x,y-positions of the mouse button when pressing and releasing the button.

  • right mouse double click - reset to original zoom level.

Below the video area, there is an additional notebook with 3 subpages:

  • Video - allows for adjusting the cross-hair and offers controls for video stream adjustments (brightness, contrast, etc.)

  • Motors - offers a compact copy of the main \"Motors\" page, so you can drive the motors easily with visual feedback.

  • Centering - guided sample centering routines in 5 steps:

1. Step: drive Gonio:Phi to 90.0 deg.\ Click on the \"Drive\" button and let the axis drive. When finished, click the \"Next\" button.

2. Step: Fine tune Gonio:Phi\ The goal here is to find a position for Gonio:Phi where the sample really is perpendicular to the plane of the grid. Click \"Next\" to continue.

3. Step: Drive Gonio:Phi to -90.0 deg.\ Readjust as in 2 if necessary. Click \"Next\" to continue.

4. Step: Confirm\ Gonio.Phi drives by 180 deg. If you are happy with the alignment, press \"Confirm\".

NOTEBOOK:STEM#

On this page, you can inspect STEM images. STEM is a rastered electron microscope picture of a defined section of the sample. Using STEM, you can see details of a sample that cannot be resolved by a light microscope. We are talking about nanometers and not micrometers any more. A STEM image is produced by driving the electron beam over a defined 2D area and capturing data by special electron detectors called \"bright-field\" or \"dark-field\". Since we use the electron beam to drive over the sample, producing STEM images may produce radiation damage in the sample - as opposed to visible light. You will therefore want to keep the amount of STEM images low if you later on want to collect diffraction data from that sample. STEM images come as sequence of single pixel data with 16-bit accuracy that are assembled to a 2D image and suitably colorized.

The STEM page comes with many subpages:

  • Tools - see NOTEBOOK:STEM:SERIES

  • Tools - see NOTEBOOK:STEM:OFFSETS

  • Prealign - see NOTEBOOK:STEM:PREALIGN

  • Series - see NOTEBOOK:STEM:GRID SCAN

  • Series - see NOTEBOOK:STEM:MAP

  • Colors - see NOTEBOOK:STEM:COLORS

NOTEBOOK:STEM:SERIES#

To produce new STEM images while not moving any motor of the goniometer, press the \"Single\" button on this page. The STEM image will use the given parameters for the FoV (field of view), typically somewhere from 10 microns to 200 microns. On the left hand side of this page you will also find 2 arrow buttons that allow you to already load stored STEM images in the given directory. The images are sorted alphabetically, so the left arrow will go back in the alphabet and the right arrow will move on.

There is a choice for automatically finding particles or pins in collected STEM images. By default, when collecting new STEM images, the program will try to find a particle close to the center of the image. By magic, it will paint a cross at the center of the particle. On special occasions, instead of particles, pins might be used. Find a pin is entirely different to finding a particle. A pin is a relatively large area with straight edges and a tip. Finding a pin actually means finding the tip of a very well defined pin in a reproducible manner. Just try it out, if you happen to work with a pin.

If a particle has been properly located, the coordinates of its center will be written into the tiff header, so this information can be retrieved from other software (e.g. tiffinfo).

To fully center a particle so it stays in the electron beam over a full data collection, you can collect a series of STEM images by pushing the \"Series\" button. You can set the following parameters for the series:

  • field of view - typically from 10 to 100 microns

  • # images - number of STEMs to be taken

  • PHI interval - PHI movement after each STEM image

  • PHI @ start - PHI position to start the the series

When pushing the \"Sereies\" button the program program will automatically move to the given PHI position @ start and shoot the given amount of images in the given PHI intervals. When the series is finished, the program will evaluate the shots and derive corrections for several goniometer axes. It will also plot the found particle positions in an extra window (that can also be obtained using the \"Plot series\" button in the \"STEM\" menu).

NOTEBOOK:STEM:OFFSETS#

For technical reasons, STEM images need a slighly different E-beam position than actual diffraction data. This is achieved by moving certain deflectors in the beam path. From time to time it may become necessary to determine and adjust the offsets of the deflector positions. This is NOT a routine operation though and should only be carried out by trained operators. The procedure implemented here works by conventional aligning a sample by taking a series of STEM images first and verifying that the sample is well centered. On this page of the GUI, you will take another STEM of the centered particle, but not in \"STEM\" mode, but in diffraction mode by pressing the \"Get STEM\" button. You will possibly find the centre of the sample in a slightly different position. By clicking to the newly found center, the program will automatically determine suitable offset for the deflectors and write them back into the E-beam system.

NOTEBOOK:STEM:PREALIGN#

The prealignment consists in find the center in x,y,z of the particle. When pushing the \"Go\" button on this page, the program will do the following:

1.: Move GONIO:Phi to 0.0 deg.\ A STEM will then be taken at PHI 0.0 and if a particle is found, the program will adjust SAMPLE:X and GONIO:Y according to the deviations of the center coordinates of the particle from the center of the image.

2.: Move GONIO:Phi to a small angle > 0.0 deg.\ This angle is given by \"PHI for Z alignment\" and should be in the range 1-10 degrees, but small enough that the particle does not move out of the field of view. A second STEM will then be shot and evaluated. From the center of the particle, a correction for SAMPLE:Z is derived.

The PREALIGNMENT should end up with an alignment that is good enough to keep a particle within the field of view for larger rotations in PHI.

NOTEBOOK:STEM:GRID SCAN#

On this page, you can program a series of STEM images to be taken in a grid. You must provide the field of view for each individual STEM image and the amount of STEM images in horizontal (x) and vertical (y) direction. You will also have to choose a value for the overlaps between individual shots. If you choose 0 %, the movements in x and y will correspond to the choice of field of view. The resulting images in the end can be assembled into a large image as a montage.

NOTEBOOK:STEM:MAP#

This actually is a cool feature that might save some time. You may automatically scan an entire grid and let the program select meshes and particles determined automatically by image recognition. There are choices to switch to manual mesh or particle selection. There are also input fields for the maximum amount of meshes and particles per mesh to use, so that neither in automatic nor in manual mode the program will attempt to shoot more STEM\'s than desired. There also is a choice of just shooting a STEM image (\"Only STEM\") or to shoot a diffraction image (still photo) to see whether the found particle also shows diffraction. The results of found meshes and particles and their corresponding diffraction data can be visualized by pressing the \"Show map\" button.

NOTEBOOK:STEM:COLORS#

When collecting STEM images, the program will automatically determine suitable colors for that image, but it is possible to optimize the visual impression by manually adjusting the following parameters:

  • palette - choice of > 20 palettes with 256 colors each. Choose your favorite.

  • min/max color - 256 colors of current palette will be distributed in bins of equal width between min. and max. value.

  • mouse click in palette - you can adjust the min. color by clicking the left mouse button in the color palette or the max. color with the right mouse button, respectively.

To further play with brightness, contrast and sharpness, you can open an additional window. Choose \"Adjust colors\" from the STEM menu or use shortcut \"CTRL+SHIFT+c\". In the window you will find sliders for:

  • brightness - modifies brightness of image

  • contrast - modifies contrast of image

  • sharpness - modifies sharpness of image

NOTEBOOK:PROCESS#

The \"Process\" page is available only if the program starts with support of the processing interface. It allows for processing electron diffraction data with either program suite DIALS. The processing options are accessible from the image viewer page (NOTEBOOK:IMAGE) Please see the separate manual page eldix.process for more details.

USERS#

The program implements 3 user policies:

  • none - all users may use all functions of the program

  • relaxed - all users may use the program and retrieve hardware information from the system but only authenticated users may change the status of the system strict - users must authenticate themselves to use the program

A single user or the name of a database containing multiple users can be given in the programs configuration file. The default user policy is \"none\". For more details how to define users, see the man pages eldix.cfg and eldixusers.

If the selected policy is \"relaxed\" or \"strict\", the program will start with a user selection window and not proceed until you have made a selection. Users can be obtained from a \"database\" file (e.g. \$HOME/.eldix.db) which is a plain ASCII-file with lines for each user containing: username:password:role The password may be a hashed password as generated by \"htpassword\" generators and that are common for web interfaces. But it can also be empty. The role can also be left empty.

PROJECTS#

Project management is enabled if the configuration file contains a master project directory and if this directory actually exists. All data are then stored in subdirectories thereof. If project management is enabled, at program start you will first get into a window from which to either load an existing project or create a new one. Double click on an existing project to load it. By manually entering a new project name that doesn\'t exist yet, the \"Load\" button will change automatically to \"Create\". When hitting the \<Return>-key in the Project name field, a random 4-char string is generated as new project name. The default location for a project always is master_directory/project_name. While it is possible to manually choose other project directories, it is wiser to stick to this convention.

The project management will show the existing projects (for the given user) and sort the list with the most recent one on top. You may remove existing projects from the list and you may also purge an existing project (i.e. remove all data within the given project). If a project is just removed from the list and not purged, it is possible to restore the list by using the \"Rebuild projects\" button.

CONSOLE INPUT#

After startup, the program accepts keyboard input from the command line (stdin). The following commands are available:

abort | stop

stop an ongoing data collection.

dir[ectory] string -

data directory for dumping images during data collection (see NOTEBOOK:COLLECT).

name string -

root name for images (i.e. the part before _####.format)

digits N -

use N digits for image numbers. form[at] cbf | tif | int16 | int32 - output image format. The formats int16 and int32 are raw arrays with 16-bit or 32-bit integer numbers, respectively.

coll[ect] [[FFRM] NFRM [TIME [NAME]] -

start a data collection with NFRM images (starting at FFRM, otherwise, at latest frame number+1), with exposure time TIME seconds and optional NAME template. If only 2 arguments are given, 2 integers are interpreted as FFRM NFRM while 1 integer and a floating point value is interpreted as NFRM TIME.

set dist[ance] | wave[length] | beamx | beamy | dphi | phi | format | trigger VALUE

provide a value for distance, wavelength, center in x or y, the oscillation range and starting angle for an image. For tiff and cbf files, this information is written into the image header. If the program supports a goniometer, phi and dphi should not normally be set automatically, possibly also the distance. Static values should usually be set in a configuration file. To set an output format (set format ...), see keyword \"format\". To set a trigger mode for EIGER detectors, see keyword \"trigger\".

trigger [ints | inte | frame_time ]

The \"trigger ...\" instruction only applies to EIGER detectors. There are 2 (software) modes for running a data collection: \"ints\" (default) or \"inte\". In mode \"ints\", the data collection is only triggered once for a given amount of images that will be collected one after eachother. In mode \"inte\", each exposure requires its own \"trigger\" command. In mode \"inte\" You will have to give NFRM trigger commands. When giving commands \"trigger inte\" or \"trigger ints\", the trigger mode will be set but nothing else will happen. In both mode \"ints\" and \"inte\" a data collection is started with the \"collect\" command (see above). However in mode \"inte\" you will have to give NFRM trigger commands to actually do the exposure. It is the responsibility of the user to wait at least for TIME seconds before giving the next trigger command. When using the optional argument \"frame_time\" the next exposure will last for frame_time seconds, not TIME seconds.

status | config detector | filewriter | stream -

print the current status or configuration parameters for detector, filewriter or stream interface of the Dectris detector.

verb[ose] [N] -

increase verbosity (or set to level N)

debug X -

set verbosity level to X (hex code, undocumented)

help [status|config|collect|format] -

show usage information

load image -

load image file into NOTEBOOK:IMAGE area

quit -

Exit program

TCP/IP-SERVER#

When running the program in TCP/IP-server mode by providing option --tcpport N the program listens for commands on port number N. The syntax is identical to the commands given in section CONSOLE INPUT. The program by default uses port 40404 and checks if another instance of the program is already running.

REST API#

The program can be started with a HTTP-server listening for HTTP requests on the given port (see option --http N). This interface allows the entire program to be driven via HTTP requests. The implementation is not yet complete and not functional. It will be updated in future releases.

INPUT FILES#

The program automatically determines wether a selected file is an implemented image format and loads the file accordingly. The following image formats are implemented:

cbf:

Images in \"miniCBF\" format produced by Dectris detectors. Usual extensions: .cbf tiff: Images in \"tiff\" format. TIFF is a widely used graphics format for 2D images. While the raw detector data contain 32-bit values, TIFF images usually are RGB values with 24-bit data. Most common image viewer programs make use of RGB values. That is why the TIFF format used here truncates the incoming data to 24-bits and stores them as plain RGB values so they can be handled by those programs. It should be noted that it is not a good idea at all to use TIFF-files with 16-bits only since the dynamic range of diffraction images usually extends to more than 16-bits. Also, TIFF does not have a commonly accepted model to store crystallographic metadata. Hence, use of TIFF format for output is very strongly discouraged. Usual extensions: .tif or .tiff h5: Images in \"hdf5\" format produced by Dectris detectors. HDF5 is a versatile yet complicated data format for all kind of uses. The Dectris detector can produce one hdf5 data file for an entire data set or individual files for each image. Usual extensions: .h5

mar345:

Images in mar345 format. Usual extensions: .marXXXX where XXXX is 1200, 1600, 1800, 2000, 2300, 2400, 2560, 1536, 3000, 3072 or 3450

cif:

Images in \"CIF\" format. Usual extensions: .cifXXXX where XXXX is 1200, 1600, 1800, 2000, 2300, 2400, 3000 or 3450

raw:

Raw 8, 16, or 32 bit data arrays without headers. It is required, though, to provide a basic format description, so the program knows what to expect. The general form is WxH[xBPP][+OFF] where W is the number of pixels in horizontal direction and H the number of pixels in vertical direction. xBPP is the number of bytes per pixel and must not be necessarily be given, but the total size of the file in the end must be WxHxBPP bytes. A description like 512x1024x2 would therefore correspond to a 16-bit data array of 512 x 1024 pixels and the total size of the image must be 1 MByte. When giving an OFFSET preceded by a \'+\' sign, the first OFFSET bytes of the file will be skipped. Full example: 2048x2048x2+8192

OUTPUT FILES#

From the SAVE WINDOW one can produce output png files that can be used by common image display programs. From the LINE window, Ascii-files from the plots can be produced for further analysis. For more details about log files, see section LOG FILES

LOG FILES#

The program typically produces log files in the specific directories. On Windows, the default log directory is %APPDATA%\ELDICO\eldix, on Linux the the default log directory is \$HOME/.local/share/ELDICO/log. The default may be set by environment variable \"ELDICO_LOGDIR\". Please see eldix.log.1 for more details.

CONFIGURATION FILE#

The program reads a Windows type configuration file at startup. See \"man eldix.cfg\" for details.

SEE ALSO#

eldix.cfg, eldix.log, eldixusers, eldix.process (not available yet)

AUTHOR#

Claudio Klein, Marxperts GmbH, Norderstedt, Germany

COPYRIGHT#

© Copyright 2023 Marxperts GmbH, Norderstedt, Germany

ADDRESS#


_

MarXperts GmbH Phone: +49 - (40) - 529 884-0 Werkstr. 3 FAX: +49 - (40) - 529 884-20 D-22844 Norderstedt - GERMANY info\@marxperts.com www.marxperts.com _