I tried to convert MSL's first 2D diffraction pattern to a 1D pattern. The first problem is to find the center of the pattern of rings. This was done by doing a least squares fit for five pixel points on one of the rings. The calculation goes as follows.
One can check the fit by plotting a circle on the 2D diffraction pattern.
A 1D diffraction pattern was obtained by measuring the distances of the image pixels from the center of the rings and summing the gray scale image values for the radii in one pixel intervals and then dividing by the number of pixels in each interval to get average values.
The peaks in the 1D plot can be compared with powder diffraction databases to determine the minerals present. For more information on XRD and CheMin see the MSL Science Corner and David Blake's Historical Perspective.