User Tools

Site Tools


processing:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
processing:start [2018/07/10 15:40] – [Procedure for simulating data and their comparison with actual data (long)] matthiasprocessing:start [2019/06/07 18:00] (current) – [Workflow: Getting a list of grains and their orientations] matthias
Line 5: Line 5:
 {{ ::processing:workflow.jpg?nolink&600 |}} {{ ::processing:workflow.jpg?nolink&600 |}}
  
-===== Software =====+===== Data collection =====
  
-The scripts and software you should use for each step are +Usually, the data is collected in synchrotron facilities by stepwise rotating the sample while the detector is acquiring diffraction imagesFor more informationclick [[dac_experiments:geometry|here]].
-  * Data: you should look at your diffraction data with [[software:fabian|Fabian]]. Pay attention about image orientation and rotation. You can also start looking at diffraction intensity levelsin the background, in the peaks, etc. +
-  * Generating backgroundsmedian, average images: [[software:imagemath|Image Math]]+
-  * Looking at images with background subtracted: [[software:fabian|Fabian]]. +
-  * Peak extraction: [[software:peaksearch|Peaksearch]] +
-  * To be completed...+
  
-===== Procedure for simulating data and their comparison with actual data (short) =====+===== Workflow: Training with simulated data =====
  
-  - 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. You find an example of an input file [[fileformat:inp:basic|here]]. +Starting with real data might be complicated if you are beginner in MGCTraining the actual workflow with simulated data can help you to verify if your workflow is correctIt also makes you familiar with the software. Pitfalls are better visible with artificial data.
-  - Next you can run the simulation with [[software:polyxsim|PolyXSim]]. This simulation may take while... +
-  - Afterwards, you can look at the output with [[software:fabian|Fabian]]. +
-  - If you have "real" data, this would be the point when you work on the background (more information on this topic [[software:imagemath|here]])If you also simulated noise, strain or other things that make your data look more like "real" data, it might be useful to do a background substraction, too. +
-  - Now you can search for peaks using the software [[software:peaksearch|PeakSearch]]. +
-  - In [[software:imaged11|ImageD11]] the found peaks are fitted to the parameters of the sample and experiment, followed by the calculation of the g-vector. +
-  - With the calculated g-vector, the grains will now be indexed, using [[software:grainspotter|GrainSpotter]]. +
-  - The calculated grains should then be compared and checked with the simulated grains.+
  
-===== Procedure for simulating data and their comparison with actual data (long) =====+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:workflow_training|Click here to train your workflow with a simulated dataset.]]
-The following chapter deals with the actual use of all the software mentioned above. We describe path where you can see what you can do with the software when it's working. If you need help with installing or running the software you should check out the wiki pages of the individual software. +
-</WRAP>+
  
-==== 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 of this step is to simulate the outcome of a DAC experiment (grains with random orientations, random strains etc.). It is a possibility to check outcome of an actual experiment. The simulation will not only provide 2D diffraction images but also G-vectors, inverse Ub matrices 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). +===== Workflow: Getting a list of grains and their orientations ===== 
 +This workflow will provide you with a list of grains, as well as an orientation of each single grain in your sample[[processing:workflow_dac_data|Click here when you feel ready to rock]]
  
-Create an input file with the ending //.inp//For a start, simply modify an existing one like [[fileformat:inp:basic|this]]Afterwards, you can run the simulation with [[software:polyxsim|PolyXSim]]. Write the following to the Konsole: +===== ... ===== 
-  PolyXSim.py -i 'some_input_file'.inp +More to come ...
- +
-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// --> //Orientation//. Choose the one which is the same as in your input file. +
- +
-==== 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/median image which should remove the background. Of course, if you switched off the background in the previous simulation this process won't change anything. But in case you have real data, this procedure is essential! +
- +
-For calculating the average and median you use [[software:imagemath|Image Math]]. Type to the Konsole: +
-  image_math_petra 'name stem of the .edf file' 'first image number' 'last image number' median +
-  or +
-  ./image_math_petra.bin 'name stem of the .edf files including their directory path' 'first image number' 'last image number' median +
- +
-For more information on which syntax you should use, check the [[software:imagemath|Image Math wiki page]]. The calculation will create three additional //.edf// files which are automatically stored in the same folder. They share the same name with the other //.edf// files except for an additional letter **m** (for median) in the middle of the name. So look carefully not to oversee them. The images are numbered from 1 to 3.  +
-  * Image //m1// is the **average** image +
-  * Image //m2// is the **median** image +
-  * Image //m3// is the **??** image +
- +
-Since they are also //.edf// images, you can also have a look at them with Fabian if you like. 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// --> //Correction// --> //Subtract background// and choose the m2 imageNow every image which is currently loaded (including those which you can access by clicking on //next// and //previous//) gets subtracted by this m2 image (median).+
processing/start.1531230014.txt.gz · Last modified: (external edit)