def calculate_aspect(self, shape, extent):
        dx = abs(extent[1] - extent[0]) / float(shape[1])
        dy = abs(extent[3] - extent[2]) / float(shape[0])
        return dx / dy
dataset/ETHPy150Open ejeschke/ginga/ginga/mplw/ImageViewMpl.py/ImageViewMpl.calculate_aspect/original