User Tools

Site Tools


processing:search_for_peaks

Differences

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

Link to this comparison view

Next revision
Previous revision
processing:search_for_peaks [2019/02/14 18:32]
smerkel created
processing:search_for_peaks [2019/02/20 21:51] (current)
smerkel
Line 1: Line 1:
-===== Search for peaks =====+====== Search for peaks ======
  
 Once your processed your images, removed your background, etc, you are ready to extract peaks. Once your processed your images, removed your background, etc, you are ready to extract peaks.
Line 7: Line 7:
  
 You can also define several threshold values and see the result. You can also define several threshold values and see the result.
 +
 +==== Peak search script ====
  
 You can then start the [[software:​peaksearch|PeakSearch]] algorithm: You can then start the [[software:​peaksearch|PeakSearch]] algorithm:
-  peaksearch.py -n 'stem' ​-f 'first image number' ​-l 'last image number' -d 'background'​ -t 'threshold ​value 1' ​-t '​threshold value 2' ​ -t '​threshold value 3' etc+  peaksearch.py -n stem -f first_image_number ​-l last_image_number -t threshold1 -t threshold2 ​ -t threshold3 etc 
 +   
 +You are working with a dataset in which the background has not been removed in a previous operation, you can add the option ​''​-d background'​' where //​background//​ is the name of you background file. Typically, this could be the median that you calculated at some point. 
 + 
 +If you already removed the background (in the diamond spot removal step, for instance), you should not remove any background anymore. This would remove the background twice! 
 + 
 +Full example 
 +  peaksearch.py -n ../​Data/​data -f 0 -l 111 -d ../​Data/​median.edf ​-t 20  
 +in which 
 +  * ../Data/: path to the folder with the .edf files, 
 +  * data: the stem (common part) of the .edf files; 
 +  * 0: number of the first .edf file, 
 +  * 111: number of the last .edf file, 
 +  * ../​Data/​median.edf:​ name and path of the median image, 
 +  * 20: a threshold ​over which to identify peaks (you can request multiple thresholds with multiple ​-t options). 
 + 
 +There are other parameters you can apply. To get a full list: 
 +  peaksearch.py ​-
 + 
 +==== Merging peaks ==== 
 + 
 +There is a command to merge peaks extracted with different thresholds into a single peak file, I believe, but I can not remember how to do so. 
 +  
 +==== Evaluating results ==== 
 + 
 +To check the outcome of the peak search, you can load the peaks which were found into [[software:​fabian|Fabian]] and see if they match the actual peak positions.  
 + 
 +To do this, you have to go click on //​CrystTools//​ --> //Peaks// --> //Read peaks// and choose the //.flt// file which PeakSearch just created. They should appear as red circles on the diffraction image.  
 + 
 +You can switch on/off the diffraction spots by clicking on //​CrystTools//​ --> //Peaks// --> //Show//. 
 + 
 +Below is an example of Fabian showing a diffraction image in Fabian after background processing and artifact removing as well as the same image with peaks overlay after a peak search. 
 + 
 +[{{:​processing:​diff-1345-diamond-removed.jpg?​300 |Diffraction image in Fabian after background processing and artifact removing)}}][{{ :​processing:​diff-1345-peaks.jpg?​300|Same image showing peaks after peak search }}]
  
-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 //​CrystTools//​ --> //Peaks// --> //Read peaks// and choose the //.flt// file which PeakSearch just created. They should appear as red circles on the diffraction image. You can switch on/off the diffraction spots by clicking on //​CrystTools//​ --> //Peaks// --> //Show//. 
processing/search_for_peaks.1550169132.txt.gz · Last modified: 2019/02/18 10:11 (external edit)