User Tools

Site Tools


Evaluate background

One necessary step of the data processing is the subtraction of the background. One way to do it is to create an average or a median image of the whole file series and then subtract each single image by this average/median. This method has the advantage that you not only get rid of the background noise but also all those reflections which are visible homogeneously in every image, such as pressure media, artefacts on the detector or some diamond spots.

Subtract average or median?

Creating an average image can be done with timelessMeanFileSeries which is part of the TIMEleSS tools. Creating the median can be done with which comes with Fabian.

The median image is less affected by outliers than the average. Therefore, if you have strong diamond peaks in some of the images, you will probably still see them also on the average image while there are none in the median one. Because of that, for subtracting the background the median image should be preferred. However, for other purposes you might still need the average image.

When to subtract the background?

There are several options to subtract the background. It depends on your data and your goal which way you take. But whichever way you choose, only subtract the background once!

Some of the tools (such as timelessDiamondSpotRemoval) subtract a background image anyway. So, if you have to use the DiamondSpotRemoval, make sure not to use the other tools (or switch their background subtraction off, if possible).


timelessDiamondSpotRemoval is part of the TIMEleSS tools. It is specific to diamond anvil cell experiments.

For more information on how and when to use it, check out the page for how to clean up your diamond anvil cell data. timelessDiamondSpotRemoval requires a background image as input. In the process, the background you selected is subtracted from each of your images .

I don't want to subtract the background - What can I do?

It might be a rare case but sometimes it might be necessary to perform the the Diamond Spot Removal but no background subtraction (for example if the intensity after subtracting the background is too low for further processing). Luckily, there is a way to trick the script: You can create an empty image (there is a TIMEleSS tool for this) and use it as an input for the background. However, this has also a downside: The Diamond Spot Removal does not work as well. So do this only if it is really necessary.


Peaksearch also has an option for background subtraction. In the input of the command line, you have to add an option -d somebackgroundimage.edf which will then subtract somebackgroundimage.edf from each of the images before applying the peaksearch algorithm.

processing/backgrounddac.txt · Last modified: 2019/09/04 16:40 by smerkel