'**SUMMARY**
Given a tolerance, test if the blob is a rectangle, and how close its
bounding rectangle\'s aspect ratio is to 1.0.
**PARAMETERS**
* *tolerance* - A percentage difference between an ideal rectangle and our hull mask.
* *ratiotolerance* - A percentage difference of the aspect ratio of our blob and an ideal square.
**RETURNS**
Boolean True if our object falls within tolerance, false otherwise.
**EXAMPLE**
>>> img = Image("lenna")
>>> blobs = img.findBlobs(128)
>>> if(blobs[-1].isSquare() ):
>>>     print "it is hip to be square."'

def isSquare(self, tolerance=0.05, ratiotolerance=0.05):

    if (self.isRectangle(tolerance) and (abs((1 - self.aspectRatio())) < ratiotolerance)):
        return True
    return False
