Fit2D is free software for multi-purpose data reduction, visualisation, and analysis (instructions on how to obtain it are here, or ask W. Crichton / D. Druzhbin).

Here is a short tutorial on the integration of obtained 2D .edf data in Fit2D. This tutorial is optimised for beta version 18_002 for Windows.

Double click on the Fit2D shortcut and launch the program. In opened menu change X-DIMENSION to 5000 (any number slightly ≥ 4439 a number of pixels) and Y to 10000 (any number that is bigger than your number of files), so that all data can fit in. The rest should be YES, NO as shown in the figure below. To do that, click on X-DIMENSION and enter the required number below, press OK. Repeat for Y. It can crash if the input number is >10000. If you moved the fit2d window and it turns white, do "maximise" the window and then "restore down".

After that Press OK. The main menu will appear. The fastest way to integrate many files is by using MACROS. For that, create a .txt document with the following content (with some corrections, see bold comments). If you use an old fit2d version then it can cause some problems.


%!*\ BEGINNING OF GUI MACRO FILE
%!*\
%!*\ This is a comment line
%!*\
EXIT
IMAGE PROCESSING (GENERAL)
INPUT
C:\Users\data\data_0000.edf %!*\ replace this line with a path to the first file in a series of .edf files
MASK
CLEAR MASK
THRESHOLD MASK
YES
1.000000
THRESHOLD MASK
NO
10000
EXIT
EXIT
FILE SERIES
INTEGRATE
C:\Users\data\data_0000.edf %!*\ replace this line with a path to the first file in a series of .edf files
YES
EXIT
C:\Users\data\data_1000.edf  %!*\ replace this line with a path to the last file in a series of .edf files in the same directory
1
O.K.
X-PIXEL SIZE
172
Y-PIXEL SIZE
172.0
DISTANCE
3048.363 %!*\ change DISTANCE parameter according to the calibration performed earlier
WAVELENGTH
0.233933 %!*\ the same is for the wavelength and X-beam centre below
X-BEAM CENTRE
5354.873
Y-BEAM CENTRE
97.5
O.K.
SCAN BINS
5000 %!*\ the same as X-DIMENSIONS or smaller (otherwise Fit2d crashes/doesn't do anything)
O.K.
SCAN TYPE
2-THETA
O.K.
YES
CHIPLOT
chi
OPTIONS
ASPECT RATIO
NO
X-AXIS LABEL
2theta
EXIT
EXIT
IMAGE PROCESSING (GENERAL)
MACROS / LOG FILE
%!*\ END OF IO MACRO FILE


Save it (preferably somewhere in the data directory), it can be .txt or .mac format. In the Fit2D main menu click on the "MACROS / LOG FILE" button. Then "RUN MACRO" button.

In the opened navigation menu, find your MACRO file. To navigate use UP DIR and navigation/scroll buttons (most right field). A single click on a folder opens it (the right field shows files in a directory). Once you are in the folder single click on your MACRO file. If everything is fine with the MACRO Fit2D ends up with a 2D image (right figure below) and in your .edf data directory .chi files appear (ASCII CHIPLOT format, with1-D data file of 2θ versus intensity). In case of a problem with the MACRO file (usually it is a wrong directory or filename!) the software crashes or shows an error message. If the ratio of the figure is far from the square, click the "OPTIONS" button.

Then click "ASPECT RATIO", and "NO" (It will increase your image aspect ratio. By default, pixels are drawn square, so if the ROI is rectangular, the image is rectangular). The "Z-SCALING" menu allows the range of intensity values displayed to be changed and to control the manner in which data array intensity values are converted to output pixel colours. Start with a "WEAK PEAKS" option (designed to display the weak features of diffraction data), and then you can play with "+MAXIMUM", "-MAXIMUM", "+MINIMUM", "-MINIMUM" (each changes limit by 10%). "FULLY AUTOMATIC" can be convenient too. To leave this menu, click "EXIT".  A colour table can be changed in a "COLOURS" menu. Once .chi files are created for all .edf in a directory, they can be opened again in a 1-D  or 2-D modes.