def get_scaled_cutout_basic_view(shp, x1, y1, x2, y2, scale_x, scale_y):
    """
    Like get_scaled_cutout_basic, but returns the view/slice to extract
    from an image, instead of the extraction itself
    """

    # calculate dimensions of NON-scaled cutout
    old_wd = x2 - x1 + 1
    old_ht = y2 - y1 + 1
    # calculate dimensions of scaled cutout
    new_wd = int(round(scale_x * old_wd))
    new_ht = int(round(scale_y * old_ht))

    return get_scaled_cutout_wdht_view(shp, x1, y1, x2, y2, new_wd, new_ht)
dataset/ETHPy150Open ejeschke/ginga/ginga/trcalc.py/get_scaled_cutout_basic_view/original