This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
software:imagemath [2018/07/10 08:30] matthias |
software:imagemath [2019/09/05 12:54] smerkel |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Evaluation of the background (Image Math) ====== | + | ====== ImageMath ====== |
===== What does the program do? ===== | ===== What does the program do? ===== | ||
- | Image Math is a tool to calculate the average and the median of all the diffractograms. | + | ImageMath is a set of script to work on diffraction images. We use it to calculate the average and the median of all the diffractograms. |
It was written by Gavin Vaughan at ESRF and is available on the old fable website: [[https://sourceforge.net/p/fable/code/HEAD/tree/ImageTools/trunk/Image/code/image_math.c]]. You have to install the whole //image// package to get it working. | It was written by Gavin Vaughan at ESRF and is available on the old fable website: [[https://sourceforge.net/p/fable/code/HEAD/tree/ImageTools/trunk/Image/code/image_math.c]]. You have to install the whole //image// package to get it working. | ||
Line 9: | Line 9: | ||
In fact there is a small issue with it. S. Merkel did find a fix some years ago but does not remember what he did. He has a binary called image_math_petra that works. This should be fixed at some point... | In fact there is a small issue with it. S. Merkel did find a fix some years ago but does not remember what he did. He has a binary called image_math_petra that works. This should be fixed at some point... | ||
- | ===== Installing Fabian ===== | + | ===== Installing Image Math ===== |
==== Necessary Hardware and Software ==== | ==== Necessary Hardware and Software ==== | ||
First of all, you will need Linux, either as a separate harddrive (with lots of memory space) or as a virtual machine on your Windows/Apple computer. In case you are not familiar with Linux, ask your administrator for help and maybe do an online crash course to learn basic navigation and so on. | First of all, you will need Linux, either as a separate harddrive (with lots of memory space) or as a virtual machine on your Windows/Apple computer. In case you are not familiar with Linux, ask your administrator for help and maybe do an online crash course to learn basic navigation and so on. | ||
- | The next thing to do is to ask [[people:smerkel|S. Merkel]] for the binary file. It is called //image_math_petra.bin//. Sometimes //.bin// files are stopped by the firewall of the mailing program. In this case, try out another mailing program or use a cloud. | + | The next thing to do is to ask [[people:sebastienmerkel|S. Merkel]] for the binary file. It is called //image_math_petra.bin//. Sometimes //.bin// files are stopped by the firewall of the mailing program. In this case, try out another mailing program or use a cloud. |
==== Installation ==== | ==== Installation ==== | ||
Line 27: | Line 27: | ||
===== Working with Image Math ===== | ===== Working with Image Math ===== | ||
- | From the command line in the folder with the .edf files type image_math_petra [stem name] [first file] [last file] [operation] \\ \\ | + | From the command line in the folder with the //.edf// files type image_math_petra [stem name] [first file] [last file] [operation] \\ \\ |
Example: | Example: | ||
image_math_petra fcc_1_ 0 111 median | image_math_petra fcc_1_ 0 111 median | ||
- | | + | |
- | The program will create three new files, which are named the same as your previous .edf images, just with an 'm' in the middle. | + | In case you have only the //.bin// file this won't work. You have to go to the folder where //image_math_petra.bin// is stored and type this to the Konsole: |
+ | sudo ./image_math_petra.bin /'directory'/.../'directory'/fcc_1_ 0 111 median | ||
+ | Make sure you get the path of the //.edf// images right. Otherwise //image_math_petra// will not find it. This second way is a bit inconvenient since you need the root password every time you want to perform the calculation. | ||
+ | |||
+ | The program will create three new files, which are named the same as your previous //.edf// images, just with an **m** in the middle. | ||
* fcc_1_m10000.edf (average image) | * fcc_1_m10000.edf (average image) | ||
* fcc_1_m20000.edf (median image) | * fcc_1_m20000.edf (median image) |