processing:start
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| processing:start [2019/02/08 16:43] – [Grain indexing] matthias | processing:start [2019/06/07 18:00] (current) – [Workflow: Getting a list of grains and their orientations] matthias | ||
|---|---|---|---|
| Line 5: | Line 5: | ||
| {{ :: | {{ :: | ||
| - | ===== Software | + | ===== Data collection |
| - | The scripts and software you should use for each step are | + | Usually, the data is collected |
| - | * Data: you should look at your diffraction data with [[software: | + | |
| - | * Generating backgrounds, median, average images: | + | |
| - | * Looking at images with background subtracted: [[software: | + | |
| - | * Peak extraction: [[software: | + | |
| - | * To be completed... | + | |
| - | ===== Workflow | + | ===== Workflow: Training with simulated data ===== |
| - | The goal of this workflow is to get a list of grains and their specific orientations. You can either start with a simulation to check if your whole workflow is working properly or start with real diffraction | + | Starting |
| - | - Create an input file with the ending //.inp//. It should contain information on instrumentals of the experiment, the grain, the sample, strain, background, peak shape, and so on. | + | |
| - | - Next you can run the simulation with [[software: | + | |
| - | - Afterwards, you can look at the output | + | |
| - | - If you have " | + | |
| - | - Now you can search for peaks using the software | + | |
| - | - In [[software: | + | |
| - | - With the calculated g-vectors, the grains will now be indexed, using [[software: | + | |
| - | - The calculated g-vectors should then be compared and checked | + | |
| - | ===== Workflow for getting grains and their orientations (full) ===== | + | But even when you are working with real data, you can compare your results with the outcome of the simulation to prove if they are reasonable. |
| - | <WRAP center round tip 60%> | + | [[processing: |
| - | The following chapter deals with the actual use of all the software mentioned above. We describe | + | |
| - | </ | + | |
| - | ==== Producing data by simulation | + | ===== Workflow: Find out the phases in your sample and their cell parameters |
| + | This step is actually not part of the MGC but a normal Rietveld refinement. However, it is a necessary step for further processing workflows. | ||
| - | The purpose | + | ===== Workflow: Getting a list of grains |
| + | This workflow will provide you with a list of grains, as well as an orientation of each single grain in your sample. [[processing: | ||
| - | The simulation will not only provide 2D diffraction images but also G-vectors, inverse UB matrices (UBi) and some more files. You will get at least 7 different files from the simulation plus the diffraction images. The amount of diffraction images depends on the ω range and the step size you put into the input file. For example, a ω range from -28° to +28° with a step size of 0.5° produces 112 images (numbers from 0 to 111). | + | ===== ... ===== |
| - | + | More to come ... | |
| - | Create an input file with the ending //.inp//. For a start, simply modify an existing one like [[fileformat: | + | |
| - | PolyXSim.py -i ' | + | |
| - | + | ||
| - | The 7 different files (which were just mentioned above) are usually created quite fast. The time consuming process is the creation of images. This time highly depends on the parameters you put in the input file, e.g. the amount of grains, the peak shape and if you switched on strain tensors or noise. If you just want to test if the software is working it is wise to use an input file with very simple parameters (only 1 grain, no strain tensors, no noise, small ω range etc.). | + | |
| - | + | ||
| - | While the simulation is running you can already look at the images, which are already created. For this, open a new tab in the Konsole and open Fabian: | + | |
| - | fabian.py | + | |
| - | + | ||
| - | This is convenient because you can already see at this point if your simulation works. And in case it does not, you can stop the simulation process right now and you don't need to wait until all images are created, which can take very long time. While you're at it, check also the O-matrix. You find it in Fabian under //Image// --> // | + | |
| - | + | ||
| - | ==== Working on background | + | |
| - | To get rid of the background we now add up all the diffraction images and calculate an average and a median image. Then, every image is subtracted by this average/ | + | |
| - | + | ||
| - | For calculating the average and median you use [[software: | + | |
| - | image_math_petra 'name stem of the .edf file' 'first image number' | + | |
| - | or | + | |
| - | ./ | + | |
| - | + | ||
| - | For more information on which syntax you should use, check the [[software: | + | |
| - | * Image //m1// is the **average** image | + | |
| - | * Image //m2// is the **median** image | + | |
| - | * Image //m3// is the **??** image | + | |
| - | + | ||
| - | Next, the actual images have to be subtracted by one of these three images. Usually the m2 image (median) is used for this, because it is less affected by outliers. Before you do this, make sure you have a separate folder to avoid mixing up the actual data with the processed data! Raw data should never be modified! | + | |
| - | + | ||
| - | Look at the images in Fabian, go to //Image// --> // | + | |
| - | + | ||
| - | ==== Peak extraction | + | |
| - | + | ||
| - | From these processed images you can now extract the peaks. Look at some random peaks from several images by zooming in (in Fabian) and check out their intensity. Try to estimate a threshold value which defines how intense a peak must be to be seen by the algorithm. Try to define a threshold, which separates peaks from background (everything above the threshold value is a peak, everything below is background). If you are not sure you can also define several threshold values. | + | |
| - | + | ||
| - | When you defined one (or more) threshold(s) you can start the [[software: | + | |
| - | peaksearch.py -n ../' | + | |
| - | + | ||
| - | To check the outcome of PeakSearch, you can load the peaks, which were found, into Fabian and see if they match the actual peak positions. To do this, you have to go click on // | + | |
| - | + | ||
| - | ==== Experimental parameters ==== | + | |
| - | + | ||
| - | From these peaks you can now fit the experimental parameters. To do this, open [[software: | + | |
| - | ImageD11_gui.py | + | |
| - | To load the PeakSearch file click on // | + | |
| - | + | ||
| - | Before you check the plots you should enter the measurement parameters. Go to // | + | |
| - | + | ||
| - | Next you can have a look at the //tth/eta plot//. Most of the peaks should appear to be on imaginary vertical lines. Zoom in and check, if these lines are completely vertical. If not, you might have strain in your sample. If the line looks like a sinus curve of exactly one period this is due to a wrong beam center. To fix this, go back to //Edit parameters// | + | |
| - | + | ||
| - | At some point you can click on // | + | |
| - | + | ||
| - | ==== Grain indexing ==== | + | |
| - | + | ||
| - | This step is necessary to get the G-vectors from your grains. | + | |
| - | + | ||
| - | In ImageD11, click on // | + | |
| - | + | ||
| - | To index the grains you need [[software: | + | |
| - | + | ||
| - | To start GrainSpotter, | + | |
| - | GrainSpotter.0.90 ' | + | |
| - | or | + | |
| - | grainspotter ' | + | |
| - | For more information on which syntax you should use, check the [[software: | + | |
| - | + | ||
| - | The outcome of the GrainSpotter algorithm is three files: a //.gff// file, a //.ubi// file and a //.log// file. These files contain information on the amount of grains it found, their UBi matrices and some more info. If you are already working with real data, you can now interpret what you got. | + | |
| - | + | ||
| - | + | ||
| - | ==== Check your workflow ==== | + | |
| - | + | ||
| - | If you did a simulation in advance, this is the time to check if you (and the software) did a good job or not. Open the //.gve// file which was just created by GrainSpotter and compare the g-vectors with the ones which were created by the simulation at the very beginning. The UBi matrices can be in a different order but should be the same. Remember that some rows or columns within the matrix can be inverted due to symmetry. | + | |
| - | + | ||
| - | <WRAP center round box 60%> | + | |
| - | **Example**: | + | |
| - | + | ||
| - | From PolyXSim | + | |
| - | | + | |
| - | -4.411 -0.360 -1.912 | + | |
| - | | + | |
| - | </ | + | |
| - | + | ||
| - | If all the simulated UBi matrices match the calculated ones, you can be quite sure that your workflow is running properly. In a next step you can work with real data. | + | |
processing/start.1549640601.txt.gz · Last modified: (external edit)
