Automatic crop in pycat