'**SUMMARY**
This method returns the log value of the magnitude image of the DFT transform. This
method is helpful for examining and comparing the results of DFT transforms. The log
component helps to "squish" the large floating point values into an image that can
be rendered easily.
In the image the low frequency components are in the corners of the image and the high
frequency components are in the center of the image.
**PARAMETERS**
* *grayscale* - if grayscale is True we perform the magnitude operation of the grayscale
image otherwise we perform the operation on each channel.
**RETURNS**
Returns a SimpleCV image corresponding to the log magnitude of the input image.
**EXAMPLE**
>>> img = Image("RedDog2.jpg")
>>> img.getDFTLogMagnitude().show()
>>> lpf = img.lowPassFilter(img.width/10.img.height/10)
>>> lpf.getDFTLogMagnitude().show()
**NOTES**
* http://en.wikipedia.org/wiki/Discrete_Fourier_transform
* http://math.stackexchange.com/questions/1002/fourier-transform-for-dummies
**SEE ALSO**
:py:meth:`rawDFTImage`
:py:meth:`getDFTLogMagnitude`
:py:meth:`applyDFTFilter`
:py:meth:`highPassFilter`
:py:meth:`lowPassFilter`
:py:meth:`bandPassFilter`
:py:meth:`InverseDFT`
:py:meth:`applyButterworthFilter`
:py:meth:`InverseDFT`
:py:meth:`applyGaussianFilter`
:py:meth:`applyUnsharpMask`'

def getDFTLogMagnitude(self, grayscale=False):

    dft = self._getDFTClone(grayscale)
    chans = []
    if grayscale:
        chans = [self.getEmpty(1)]
    else:
        chans = [self.getEmpty(1), self.getEmpty(1), self.getEmpty(1)]
    data = cv.CreateImage((self.width, self.height), cv.IPL_DEPTH_64F, 1)
    blank = cv.CreateImage((self.width, self.height), cv.IPL_DEPTH_64F, 1)
    for i in range(0, len(chans)):
        cv.Split(dft[i], data, blank, None, None)
        cv.Pow(data, data, 2.0)
        cv.Pow(blank, blank, 2.0)
        cv.Add(data, blank, data, None)
        cv.Pow(data, data, 0.5)
        cv.AddS(data, cv.ScalarAll(1.0), data, None)
        cv.Log(data, data)
        (min, max, pt1, pt2) = cv.MinMaxLoc(data)
        cv.Scale(data, data, (1.0 / (max - min)), ((1.0 * (- min)) / (max - min)))
        cv.Mul(data, data, data, 255.0)
        cv.Convert(data, chans[i])
    retVal = None
    if grayscale:
        retVal = Image(chans[0])
    else:
        retVal = self.getEmpty()
        cv.Merge(chans[0], chans[1], chans[2], None, retVal)
        retVal = Image(retVal)
    return retVal
