User Tools

Site Tools


processing:clean-diamond-anvil-cell-data

This is an old revision of the document!


Clean up diamond anvil cell data

Typical diamond anvil cell data for multigrain XRD has to be pre-processed and cleaned.

Elements that should be addressed are:

  • shadows from the tungsten carbide diamond seats,
  • single-crystal diffraction spots from the diamond anvils,
  • additional diffraction from very small grains (powder rings), pressure media, etc.

Shadows

Diamond spots removal

General idea

Processing of the single-crystal diffraction spots from the diamond anvils is performed using the timelessDiamondSpotRemoval script, which is part of the TIMEleSS tools.

The idea is that diamond diffraction is

  • very intense (often saturate the detector),
  • extends over many pixels (in X and Y) and in ω.

The timelessDiamondSpotRemoval script does the following - reduce the resolution of the image, to make it blur and get rid of the small features, - apply a median filter on the reduced image to clear out small diffraction spots, which are probably originating from the sample, - detect diamond diffraction spots based on a threshold in intensity, - create a mask based on the detected diamond diffraction spots, - expand the mask in X, Y, and ω to account for the fact that the real diamond diffraction spots are wider and appear over wider omega ranges than detected by the above steps.

timelessDiamondSpotRemoval requires a median image. Median will be removed in this script. Once

In addition, you can define a disk, at the center of the image, in which nothing should be removed. This option is for samples with very intense diffraction spots on the inner rings which could be confused with diamond spots based on intensity criteria.

Step by step instructions

In the first round, you should test the spot detection. This is performed by running timelessDiamondSpotRemoval [options] spots. You should play on the scale, filtersize, and threshold parameters. As you run the script, it will show you the original image, and the location where it detected diamond spots. Play with the above parameters until you are satisfied with the diamond spot detection, and only diamond spots. You do not want this script to detect sample spots.

In a second round , you use timelessDiamondSpotRemoval [options] plotMask. It will run the diamond spot detection (use the parameters you found in the previous steps), create a mask, and plot it in overlay to the diffraction images. Grow your mask with growXY and growXYO. You can also force the script to ignore a disk-shape region in the center of the image with the c_rawy, c_rawz, and radius parameters.

Third step: timelessDiamondSpotRemoval [options] clearMask. Use the same option as above. It will show you the result of your mask.

Final step: timelessDiamondSpotRemoval [options] save, to save the clean images in new files.

processing/clean-diamond-anvil-cell-data.1556109621.txt.gz · Last modified: 2019/04/24 12:40 by matthias