dioptas documentation - read the docsdioptas documentation, release 0.4.0 fig. 1.1: location of...

25
Dioptas Documentation Release 0.4.0 Clemens Prescher May 05, 2020

Upload: others

Post on 24-Jun-2020

23 views

Category:

Documents


0 download

TRANSCRIPT

  • Dioptas DocumentationRelease 0.4.0

    Clemens Prescher

    May 05, 2020

  • Contents

    1 1 Introduction 11.1 1.1 Mouse Interaction in the Image and Pattern Widgets . . . . . . . . . . . . . . . . . . . . . . . . 11.2 1.2 Image Color Scale and Contrast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

    2 2 Calibration Procedure 32.1 2.1 Preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32.2 2.2 Peak Picking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32.3 2.3 The Calibration and Refinement Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

    3 3 Mask Creation 73.1 3.1 Selection Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83.2 3.2 Threshold Masking and Cosmic Removal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83.3 3.3 Control Buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83.4 3.4 File Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

    4 4 Integration Module 94.1 4.1 File Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104.2 4.2 Overlays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104.3 4.3 Phases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114.4 4.4 Corrections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124.5 4.5 Background subtraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144.6 4.6 Special (X-Tab) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154.7 4.7 Quick Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

    5 5 Configurations and Projects 195.1 5.1 Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195.2 5.2 Dioptas Projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

    i

  • ii

  • CHAPTER 1

    1 Introduction

    Dioptas is a GUI program for fast integration and exploration of 2D X-ray diffraction Images. It provides the capabilityof calibrating, integrating, creating masks, showing multiple pattern overlays and display phases line positions. Thebasis of the integration and calibration algorithm is the pyFAI library. The usage of pyFAI allows integration times onthe order of 80 milliseconds and calibration of every possible detector geometry.

    Dioptas has three different modules which can all be accessed by the tab indicators on the left side of the user interface:Calibration, Mask, Integration.

    The Calibration module enables you to calibrate the detector geometry. Within the Mask module you can select regionsyou want to exclude from the image integration and the Integration module is the heart of Dioptas, where you willspend most time for data exploration. It shows both, the image and integrated pattern, and one can overlay differentpattern and show line position of phases.

    1.1 1.1 Mouse Interaction in the Image and Pattern Widgets

    The basis for data exploration in are the image and pattern widgets available in all 3 modules. The interaction withthese widgets is tried to be as intuitive as possible, without extra need of different selection modes. All widgets supportto following mouse commands:

    • Left Click: Action depends on the module you are in. In the calibration view it will search for peaks. In theMask view it is the primary tool for creating the geometric objects used to build up the mask and in theintegration view it draws a line at the current two theta value.

    • Left Drag: Zooms into the selected area. It will try to scale images accordingly, but will not perfectly zoom into the selected area, because pixels are kept as square objects on the screen.

    • Right Click (Command+Right Click on Mac): Zoom out.

    • Right Double Click (Command + Right Double Click on Mac): Completely zoom out.

    • Mouse Wheel: Zoom in and zoom out based on the current cursor position.

    1

    https:\T1\textbackslash {}github.comsilx-kitpyFAIhttps:\T1\textbackslash {}github.comsilx-kitpyFAI

  • Dioptas Documentation, Release 0.4.0

    Fig. 1.1: Location of module selectors.

    1.2 1.2 Image Color Scale and Contrast

    Every image widget has a color bar and a histogram either on the side of the image (Mask module and CalibrationModule) or on the top (integration module). The colors of the color bars can be easily adjusted. You can switch toa completely different color-scale by right clicking the color bar. This creates a pop-up where one of the predefinedcolor scales can be selected. The position of the individual colors can be adjusted by dragging the triangle of thiscolor. Further the colors can be changed completely by double clicking (left) it, which will pop up a color chooser. Itis in addition also possible to add a complete new color by double clicking (left) next to the color bar. The histogramnext to the color bar shows the intensity distribution of the loaded image on a log scale. The sliders two lines definethe scaling of the image in the image view. Please feel free to adjust their position by dragging them.

    2 Chapter 1. 1 Introduction

  • CHAPTER 2

    2 Calibration Procedure

    Make sure you are in the calibration mode, which should be selected on the left side of the window.

    2.1 2.1 Preparation

    Load the calibration image by clicking the “Load file” button on the upper right side of the window. Now you can insertthe starting values for the calibration in the menu on the right. The calibration procedure will estimate distance andcenter position of the x-ray, as well as detector rotation. For this procedure the wavelength and pixel width/height haveto be defined based on the experimental setup and detector used. Please choose the correct calibrant from the Calibrantdrop-down list. In case your calibrant is not available, your own calibrant can be added in the dioptas/calibrants folderas a text file containing a list of d-spacings, Dioptas will automatically have this calibrant available in the comboboxafter a restart. Different detector orientations can be accommodated by rotation or flipping the image. These imagetransformations will be applied to all subsequent loaded images in the calibration module and in the integration module.

    2.2 2.2 Peak Picking

    In order for Dioptas to find the correct geometry it needs an initial guess for the position of some of the rings. Thisis done by selecting several peaks on each diffraction ring. The parameters for peak selection are given in the “PeakSelection” section on the right site of the calibration module, when “Calibration Parameters” is selected.

    By default automatic peak search is selected, which tries to automatically find peaks on a clicked ring. To search onthe first ring please click on it with the left mouse button. In case it is very difficult to “hit” the ring with the mouseyou can just zoom in by using the drag-zoom or mouse-wheel zoom. If the peak search was successful it should looklike this:

    If the automatic peak searching fails (when Dioptas fails to select other peaks on the first diffraction ring) there areseveral available options:

    • perform the automatic peak search on a different ring.

    – change the “Current Ring Number”

    3

  • Dioptas Documentation, Release 0.4.0

    Fig. 2.1.1: Start values for calibration

    Fig. 2.2.1: Peak Selection Options

    4 Chapter 2. 2 Calibration Procedure

  • Dioptas Documentation, Release 0.4.0

    Fig. 2.2.2: LaB6 2D diffraction image with the first ring selected.

    – and select the a peak on this ring

    • choose “single peak search”, which will search the highest intensity peak around the click position, whereby thesize of the search area is defined byt the search size

    – then search one peak for one diffraction ring (the current peak number will automatically increase)

    – or deselect the automatic increase checkbox and click several spots on the first ring, or any ring you like(with the corresponding peak number selected)

    2.3 2.3 The Calibration and Refinement Process

    After the peaks/ring(s) have been selected we can start the calibration procedure. This is done by clicking the “Cali-brate” Button on the lower left of the interface. This will calculate the geometric parameters based on the current peakselection and then automatically refine the calibration parameters.

    After refinement Dioptas will automatically create a 360 degree cake image and an integrated pattern. When theprocedure is finished it will jump to the “Cake” tab (top tab-bar above the image) and show the cake image. In thisimage you can easily check if the calibration was successful (by checking if the cake lines are straight). Additionally,the pattern is plotted with calculated calibrant positions in the “Pattern” Tab. All peak maxima should coincide withphase line positions. The resulting calibration parameters are shown by clicking the pyFAI parameters or Fit2dParameters tabs in the right control panel. The current calibration parameters can be saved by clicking the SaveCalibration button on the lower right of the user interface. To fast reuse the a calibration, the calibration can bereloaded by clicking Load Calibration.

    If the calibration failed, either the start values are wrong, the initial peak selection was faulty or the refinement param-eters need to be adjusted. For a new peak selection, just click “clear all peaks” and start the the peak selection again,make sure that current peak number belongs to the corresponding clicked ring. The meaning of each of the refinementoptions are explained in the next section.

    2.3. 2.3 The Calibration and Refinement Process 5

  • Dioptas Documentation, Release 0.4.0

    2.3.1 2.3.1 Refinement Options

    The refinement options are defined on the right control panel of the Calibration module, when “Calibration Parameters”is selected.

    Fig. 2.3.1: Available options for calibration refinement

    There are several options available:

    • automatic refinement: Defines if Dioptas should search for peaks by itself after using the initially selectedpeaks. When this option is deselected only the selected peaks are used for calculating the detector calibra-tion.

    • use mask/transparent: The refinement can be constraint to a certain image area by using a mask previouslydefined in the mask module. The image of the mask can be made transparent to be able to “look behind”

    • Peaksearch algorithm: The algorithm used for searching peaks on the ring. The standard algorithm is “Massif”although “Blob” detection may give better results in some cases.

    • Delta 2th: This is the +- search range used for automatic peak search for each ring. The center value depends onthe values, estimated by the calibration procedure, so ultimately by the initial choice of predefined peaks(Peak selection)

    • Intensity Min factor: This factor determines how many times the peak intensity has to be higher than the meanvalue of the search area (within the delta 2th value) for each individual ring. The lower this value is themore peaks will be selected, however, also the likelihood of selecting wrong background peaks increase.The default value is 3, which is good for rather spotty patterns. If your calibration image has perfectdiffraction rings, this value needs to be reduced to about 1-1.5.

    • Intensity Max: A threshold value which excludes all peaks above this value. The default value is 55000 whichis good for 16 bit detectors. In case a detector with more levels is used this value needs to be adjusted.

    • Number of rings: The number of rings on which peaks are searched. This should be chosen based on thenumber of visible rings in the calibration image. For an optimal calibration all visible rings should beused.

    If the calibration/refinement fails you can in principle play with all parameters. However, the most common adjust-ments are the number of rings and the Intensity Min factor.

    6 Chapter 2. 2 Calibration Procedure

  • CHAPTER 3

    3 Mask Creation

    In the mask module areas can be defined which will be excluded from integration or calibration. There are severalgeometries available to select different kind of areas. Additionally it is possible to mask based on threshold values andperform automatic cosmic removal. All tools are available on the right control panel in the Mask view. It can be eitherchosen to mask a certain region or unmask it (select either on the top of the control panel).

    Fig. 3.1: The Mask module of Dioptas.

    7

  • Dioptas Documentation, Release 0.4.0

    3.1 3.1 Selection Tools

    To select a specific geometry just click on it and an orange border will show which one is active right now. Allgeometric shapes are created by using left clicks:

    • Circle: The first click defines the center of the circle and the second the radius of the circle.

    • Rectangle: The first click defines one corner and the second the corner on the opposite side.

    • Point: A click will mask an area as large as the circle floating around the mouse pointer. The size of the circlecan be changed by changing the value next the the Point button or using just pressing the q and w keys.

    • Polygon: Subsequent clicks will define edges of the polygon. A double click will close the polygon (and addthe position of the double click as last point to the polygon)

    • Arc: The first 3 clicks define a circle section and the 4th click defines the thickness of the arc.

    3.2 3.2 Threshold Masking and Cosmic Removal

    In order to do threshold masking, please insert the wanted number next to the desired Thresh button and click thebutton.

    Cosmic removal is an automatic optimization procedure trying to mask cosmic rays from the image. This procedurecan take considerable amount of time, please be patient.

    3.3 3.3 Control Buttons

    • Grow: Grows the current mask by one pixel in all directions.

    • Shrink: Shrinks the current mask by one pixel in all directions.

    • Invert: This will invert the mask so that unmasked areas become masked and vice versa.

    • Clear: This will remove the complete mask.

    • Undo/Redo: Enabling to undo the last action or redo them. You can undo up to 50 actions.

    3.4 3.4 File Handling

    • Save Mask: Saves the current mask as a tiff file with intensities being 1 for masked areas and 0 for unmaskedareas.

    • Load Mask: Loads a previously saved mask. Clears the current mask before.

    • Add Mask: Loads a previously saved mask and adds it to the current mask.

    8 Chapter 3. 3 Mask Creation

  • CHAPTER 4

    4 Integration Module

    The integration module is the heart of Dioptas. Here you can automatically integrate multiple images to pattern, browsebetween images and integrated pattern, compare multiple pattern to each other, perform background subtraction andcompare pattern peak positions and intensities to the ones of known phases.

    Fig. 4.1: The integration module of Dioptas.

    In the integration module the current image is displayed on the left side with the integrated pattern shown on the lowerright. The control panel has several tabs for different functions.

    The “Img” and “Pattern” tabs are primarily for loading and browsing images and pattern, respectively. In the“Overlay” tab integrated pattern can be loaded for comparing them to the currently loaded shown active pattern. The“Phase” tab enables opening/editing jcpds files and changing the equation of state parameters of the loaded phases.The “Cor” tab gives options for performing intensity corrections. Here the absorption of a c-BN seat and diamond in

    9

  • Dioptas Documentation, Release 0.4.0

    a diamond anvil cell, or the detector scintillator can be corrected prior to integration. The controls in the “Bkg” tabcan be used to define an image as background prior to integration and doing automatic background subtraction of theintegrated pattern. The “X” (special) tab contains several additional optional features like cBN absorption correction,manual selection of the number of integrating bins.

    4.1 4.1 File Handling

    Images and pattern can be loaded by clicking the Load button in the respective modules. Images can be in differentfile formats: .img, .sfrm, .dm3, .edf, .xml, .cbf, .kccd, .msk, .spr, .tif, .mccd, .mar3450, .pnm, or any other commonimage formats. Pattern files should be 2 column files. If there is a header present it should be commented by ‘#’ signs.

    Images loaded will be automatically integrated if a calibration is available (either by performing it in the calibrationwindow or by loading a previously saved calibration file (* *.poni*) file). There are too modes for file browsing(clicking the “” buttons):

    By Name: the next and previous filenames will be searched based on the last digits in the filename. For example thenext file from test_002.tif will be test_003.tif and the previous will be test_001.tif

    By Time: The next and previous files loaded will be search based on creation time of the files. This filemode does notneed any numbers in the filenames it will just sort the files based on creation time and go forward and backwardsin this list.

    In case you want to browse through files in larger steps the “step” value can be adjusted. Any newly added file tothe current img working directory can be opened automatically by checking the autoprocess checkbox in the Imagemodule.

    By default the integrated pattern is not saved. To automatically save the integrated patterns choose an output folderin the Pattern tab by clicking the “. . . ” button and then check the autocreate checkbox. All new integrated patternswill then be automatically saved in this folder with name being the same as the image but different file extension. Theintegrated pattern can be automatically saved in 4 different formats by checking their respective boxes in the lowerright of the Pattern tab:

    • .xy: (Selected by default) A two column format with a header which contains the calibration parameters, polar-ization correction and integration unit (2th, Q or d)

    • .chi: A two column format with a 5 line header containing the filename, integration unit and number of points.Based on Fit2d output format.

    • .dat: A two column format without any header. It saved just the plain data.

    • .fxye: A three column format used by GSAS and GSAS-II. The third column is the error of the intensity whichis usually defined as square root of the integrated intensity.

    In addition to file browsing and the “load” button, files can also be loaded by inserting their name and folder in therespective text fields. The upper one is the filename and the lower one is the containing folder. If the file does not existit the text field will revert to its previous state.

    4.2 4.2 Overlays

    In the overlay control panel you can add, delete or clear overlays and adjust their scaling and offset.

    • Add: Loads a pattern file (2-column file) as overlay. It is possible to select multiple pattern and load them all atonce.

    • Delete: Deletes the currently selected overlay in the overlay list.

    • Clear: Deletes all currently loaded overlays.

    10 Chapter 4. 4 Integration Module

  • Dioptas Documentation, Release 0.4.0

    Fig. 4.2.1: Overlay controls in the integration window.

    The list of overlays shows several widgets representing the state of each individual overlay. The first checkbox controlsif the overlay is visible in the graph. The colored button shows the overlay color. Clicking on it will pop-up a color-chooser dialog where the color for this overlay can be changed. The name of an overlay is by default its filename, butit can be modified by double-clicking the name in the overlay list.

    On the right side you can adjust the scale and offset of the overlays by either entering a specific number or using thespin-box controls. The step text fields control the steps of the spin-box.

    4.2.1 4.2.1 Set as Background

    An overlay can be used as a background for the integrated pattern. In order to to so, you have to activate the “Set asBackground” button. This button sets the currently selected overlay as background for the pattern file. It can be seenthat an overlay is set as background by the Set as Background button being activated for a specific overlay and by thebackground overlay name being shown in the lower right of the graphical user interface (right below the graph). Thescaling and offset of the overlay/background can still be adjusted by using the respective spin boxes. The backgroundoverlay remains active until it is deactivated, therefore the background will be automatically subtracted from eachnewly integrated image or newly loaded pattern. If autosave for pattern is set, Dioptas will create a bkg_subtractedfolder in the autosave folder and automatically save all subtracted patterns.

    4.2.2 4.2.2 Waterfall

    The Waterfall button will automatically adjust the offset of all loaded overlays to a multiple of the text box to the rightof it. This creates a waterfall plot of all overlays. The Reset button resets all overlay offset to zero.

    4.3 4.3 Phases

    The basic controls for phases are similar to the ones in overlay:

    • Add: Loads a *.jcpds or *.cif file, calculates the line positions in the range of the current pattern and shows thephase lines in the graph. Cif-files will be internally converted into the jcpds format. For doing so, a smallwindow will pop-up asking which intensity should be the minimum intensity for each reflection (IntensityCutoff ) and up to which minimum d-spacing the reflections should be included (Minimum d-spacing). Youcan select multiple *.jcpds or *.cif files in the file dialog to load multiple phases.

    • Edit: Opens a dialog where the jcpds file can be edited. For further details see the JCPDS editor section

    • Delete: Deletes the currently selected phase in the phase list.

    4.3. 4.3 Phases 11

  • Dioptas Documentation, Release 0.4.0

    Fig. 4.3.1: Phase controls in the integration window.

    • Clear: Deletes all phases.

    • Save List: Saves a list of phases (basically a text file with the path to all phases loaded) which can be laterrestored.

    • Load List: Loads a list of phases which was previously saved by the Save List function.

    The list of phases shows several widgets representing the state of each individual phase overlay. The first checkboxcontrols if the phase lines are visible in the graph. The colored button shows the color of the phase lines. Clickingon it will pop-up a color-chooser dialog where the color for this phase can be changed. The name of an phase is bydefault its filename, but can be changed by double-clicking the name in the phase list. Additionally the pressure andtemperature for each phase is shown in the phase list. If for a particular phase thermal expansion is not in the jcpdsfile it will always display ‘- K’.

    On the right side the pressure and temperatures of the loaded phases can be adjusted. If Apply to all phases is checkedthe pressure and temperature will be set for all loaded phases. By default the pressure and temperature values will bedisplayed in the phase legend in the pattern if they differ from ambient conditions. For disabling this feature pleaseuncheck the Show in Pattern checkbox.

    4.3.1 4.3.1 JCPDS Editor

    In the JCPDS Editor the parameters of the jcps phase can be modified. Every change will be immediately reflectedin the position of the lines in the pattern. You can edit the comment, the symmetry, lattice parameter and equation ofstate parameters. Reflections can be edited in the reflections table. h, k, l and intensities can be modified by doubleclicking in the table all other parameters are calculated correspondingly. A “0” after a parameter name always meansthat this is the value at ambient condition and when there is no “0” the value corresponds to the current temperatureand pressure conditions modified in the Phase tab. The changes can be saved as a new file by clicking the Save Asbutton. If you want to revert all changes and reload the original files please press the Reload File button. If you likethe changes you made you can close the JCPDS editor either by clicking the X button or the OK button on the lowerright. The Cancel button will close the JCPDS editor and revert the changes made since the last opening of the JCPDSeditor.

    4.4 4.4 Corrections

    In the Cor tab it is possible to enable intensity corrections for cBN seats, diamonds and the scintillator thickness ofthe detector.

    12 Chapter 4. 4 Integration Module

  • Dioptas Documentation, Release 0.4.0

    Fig. 4.3.2: Graphical JCPDS editor.

    Fig. 4.4.1: Correction controls in the integration window.

    4.4. 4.4 Corrections 13

  • Dioptas Documentation, Release 0.4.0

    4.4.1 4.4.1 cBN Seat Correction

    Enabling this option calculates the theoretical transmitted intensity through a diamond and cBN seat based on theparameters entered into the text boxes. Where:

    • Anvil d: anvil thickness in 𝑚𝑚.

    • Seat d: seat thickness in 𝑚𝑚

    • Inner Seat r: radius of the small opening of the cBN seat (close to the diamond) in 𝑚𝑚

    • Outer Seat r: radius of the outer opening of the cBN seat in 𝑚𝑚

    • Cell Tilt: tilting of the cell in respect to the primary beam in degrees.

    • Tilt Rot: direction of the Cell tilt in degrees.

    • Offset: offset of the sample position from the center of the diamond - seat assemblage in 𝑚𝑚

    • Offs. Rot: defines the rotation of the center offset

    • Anvil AL: Absorption length of the anvil in 𝜇𝑚

    • Seat AL: Absorption length of the seat in 𝜇𝑚

    To see the calculated transmitted intensity distribution press the Plot button. This will show the calculated absorptioncorrection in the image view.

    4.4.2 4.4.2 Oblique Incidence Angle Detector Absorption Correction

    Enabling this option will correct the intensity response of the detector for large angles. The intensity is proportionalto the path length of the diffracted x-ray beam through the scintillator of the detector. This causes higher intensitiesat larger angles between the diffracted beam and the normal of the detector plane due to larger path lengths. Thecorrection assumes that the source of the intensity is coming from the calibrated sample position. This correction isnot valid if there is additional contribution from air or other background. The background contribution needs to beeither removed first or the correction needs to be applied to the sample and the background signal before subtraction.

    Parameters:

    • Det. Thickness: Thickness of the detector scintillator in 𝑚𝑚

    • Abs. Length: Absorption length of the detector scintillator in 𝜇𝑚

    To see the calculated intensity correction press the Plot button. This will show the calculated absorption correction inthe image view.

    4.5 4.5 Background subtraction

    In the Bkg tab an image can be loaded as background image or we can automatically subtract an estimated backgroundfrom the integrated pattern.

    4.5.1 4.5.1 Image Background

    This image will be subtracted from the original image prior to the integration process. The intensity of the image canscaled or offset by using the corresponding spin boxes. The text fields next to the spin boxes define the individualsteps for the spinbox. After each change, loading an image as background, removing it, or change the scale and offsetof the background image, the image will be automatically reintegrated.

    14 Chapter 4. 4 Integration Module

  • Dioptas Documentation, Release 0.4.0

    Fig. 4.5.1: Background controls in the integration window.

    • Load: Loads an image as background image.

    • Remove: Removes the currently loaded background image. The original image will then be integrated withoutany background subtraction.

    • Scale and Offset: The intensity of the background image is scaled by: scale x img_intensity + offset.

    4.5.2 4.5.2 Pattern Background

    Activating this, will automatically try to estimate the background in the integrated pattern using a moving averagemethod. The background will then be created by fitting the resulting pattern with a polynomial.

    • Smooth Width: Defines the width of the moving window. The unit is based on the selection in the pattern plot(2𝜃, 𝑄 or 𝑑).

    • Iterations: Number of times the moving averages filter goes through the pattern.

    • Poly Order: The order of the polynomial which is fitted after the moving average filter.

    • X-Range: Defines the minimum and maximum x-value of the pattern used for background subtraction. CAU-TION the subtracted pattern will only be displayed in this range.

    • Inspect: This button enables the inspection mode in the pattern widget (see Fig. 4.5.2). Enabling this modeshows the original pattern and the subtracted pattern (red dashed line). This is very useful to tweak thebackground subtraction parameters to the specific needs of the pattern. Furthermore, the x-range can beadjusted visually by dragging the ROI (solid yellow lines).

    Enabling the pattern background subtraction and also the inspect mode can also be easily done by using the quickactions in the pattern widget (see Fig. 4.5.2). The “bg” button on the right side will enable the background subtractionand clicking the “I” button will enable the inspection mode.

    4.6 4.6 Special (X-Tab)

    The currently available features:

    4.6.1 4.6.1 Integration

    Here you can manually specify the number of integration bins and/or choose to supersample the image. Supersamplingan image by a factor of n>1 results in of splitting of each pixel into 𝑛2 pixels with equal distribution of intensitiesamong the splitted pixels. For perfect powder samples this can result in smaller integrated peak widths and more

    4.6. 4.6 Special (X-Tab) 15

  • Dioptas Documentation, Release 0.4.0

    Fig. 4.5.2: Inspect-Mode in the pattern widget for background subtraction.

    Fig. 4.6.1: Special Options.

    16 Chapter 4. 4 Integration Module

  • Dioptas Documentation, Release 0.4.0

    points per peak if the physical pixel width is too high. However, it may result in unreasonable intensity distributions.Please use at your own risk.

    4.7 4.7 Quick Actions

    The “Image” widget and the “Pattern” widget exhibit several quick actions. Some of them can be context sensitive(e.g. if there is an image background loaded).

    4.7.1 4.7.1 Image Quick Actions

    Fig. 4.7.1: Quick actions in the image widget.

    The image quick actions are shown in the lower left of the image widget in the integration view.

    • ROI: Enables a Rectangular region of interest (ROI) on the image, which can be dragged and changed in sizeby dragging the corners. Only the image part in the ROI will be integrated.

    • Cake: The image will now always automatically shown as Cake (2d-integrated image), which basically showsthe change in intensity with azimuth.

    • Image: This will change back to only display the original image and not the cake.

    • Mask: Activates the mask for integration. The mask needs to be defined before in the Mask-module.

    • trans: This checkbox will define whether the mask is displayed with transparent or solid color.

    • bg: If checked the widget will show the background subtracted image. (a background has to be loaded to enablethis button).

    • AutoScale: Defines whether a the intensity range displayed in the image widget will be rescaled for each newloaded image.

    • Undock/Dock: This button will undock the image widget from the Dioptas window into a new window. Thisis especially useful for multi-monitor setups, where the image can be displayed on one monitor and theintegrated pattern on another.

    4.7.2 4.7.2 Pattern Quick Actions

    The pattern widget exhibits several buttons on the top and also on the right (see Fig. 4.5.2)

    • on the top:

    – Save Image: Saves the currently shown image as either a *.png file for presentation or *.tiff file asdata.

    – Save Pattern: Saves the current pattern either in a two-column format (*.xy) or the complete patterncontent in a *.png or vectorized *.svg format.

    – As Overlay: Adds the currently active pattern (white) to overlays.

    – As Bkg: Adds the currently active pattern (white) to overlays and sets it as background.

    – Load Calibration: Opens a dialog to open a *.poni calibration file and sets this as the new calibrationparameters.

    4.7. 4.7 Quick Actions 17

  • Dioptas Documentation, Release 0.4.0

    • on the right:

    – 2𝜃, 𝑄 or 𝑑: selects the unit in which the image should be integrated to a pattern.

    – bg, I: enable background subtraction and the background inspection mode.

    – AA: determines whether anti-aliasing is enabled for the pattern widget. Disabling AA improvesperformance when many overlays are shown in the pattern widget.

    – A: when enabled, a newly integrated or loaded pattern will be shown otherwise the zoom will stay asis. This will be enabled on every double right click in the pattern widget.

    18 Chapter 4. 4 Integration Module

  • CHAPTER 5

    5 Configurations and Projects

    5.1 5.1 Configurations

    Fig. 5.1.1: Location of configuration controls.

    Configuration are used to handle experimental setups with multiple detectors in one Dioptas instance. A configurationcontains the calibration information, loaded image, image corrections, mask, integrated pattern and background cor-rections. Overlays and phases are not handled in configurations and are global. By default the configuration controlpanel (Fig. 5.1.1) is hidden and only one configuration is active (single Detector mode). To enable the panel, pleaseclick the C button on the upper left corner of Dioptas. In principle, Dioptas can handle infinite configurations, however,this also means a lot of RAM usage.

    19

  • Dioptas Documentation, Release 0.4.0

    A configuration can be added or removed by the + and - buttons. Each added will be subsequently numbered and canbe selected by the buttons to the left of the - button. After adding a a new configuration the configuration will be emptyand needs to be newly calibrated for the wanted detector geometry.

    The File and Folder controls in the middle of the configuration panel enable combined file browsing for all configura-tions, whereas the Pos textfield defines the position of the number in the string. By using the “” buttons thenext or previous image in each configuration will be loaded.

    This is also true for the similar Folder “” buttons. Here Dioptas supposes that the actual filenames stay thesame, but the images are saved in subsequently indexed folders, like e.g. “run101”, “run102”. The MEC checkboxenables a special mode for the matters at extreme conditions beamline at LCLS where both, the folder and the filenameshave the run number included.

    The Factor Input is an intensity scaling factor for the image in the configuration, so that different configurations canbe compared where the detector response is not equal.

    Combine Patterns:Attempts to combine integrated patterns from all configurations, when selected. If there isoverlap between the different configurations, the intensity will be averaged.

    Combine Cakes: Attempts to combine integrated cakes from all configurations, when selected. If there is over-lap between the different configurations (which is in principle not possible in a multi detector setup), the inten-sity will be averaged.

    5.2 5.2 Dioptas Projects

    Fig. 5.2.1: Location of the project controls

    The state of Dioptas including the different configurations with image, mask, image corrections, background correc-tions overlays and phases can be open and saved in projects. This is very useful in case you want to continue workingon a project another day. The controls for this are in the upper left of the Dioptas window (see Fig. 5.2.1). The Dioptas

    20 Chapter 5. 5 Configurations and Projects

  • Dioptas Documentation, Release 0.4.0

    project files have a *.dio extension and are basically HDF5 under the hood. Thus, can the data can be also opened oredited with any HDF5 viewer.

    Opens a file browser where you can select a Dioptas project (*.dio) to open.

    Saves the current state of Dioptas into a Dioptas project (*.dio).

    Resets the current state of Dioptas. This means all phases, overlays, and configurations will be deleted and you canstart from a new fresh Dioptas.

    5.2. 5.2 Dioptas Projects 21

    1   Introduction1.1   Mouse Interaction in the Image and Pattern Widgets1.2   Image Color Scale and Contrast

    2   Calibration Procedure2.1   Preparation2.2   Peak Picking2.3   The Calibration and Refinement Process

    3   Mask Creation3.1   Selection Tools3.2   Threshold Masking and Cosmic Removal3.3   Control Buttons3.4   File Handling

    4   Integration Module4.1   File Handling4.2   Overlays4.3   Phases4.4   Corrections4.5   Background subtraction4.6   Special (X-Tab)4.7   Quick Actions

    5   Configurations and Projects5.1   Configurations5.2   Dioptas Projects