def map_val(ival, imin, imax, omin, omax):
    """
    Map input ival ranging from imin to imax to 
    corresponding value raning from omin omax
    Args:
        ival (int): Input value.
        imin (int): Input min.
        imax (int): Input max.
        omin (int): Output Min.
        omax (int): Output Max.

    Returns:
        int: The output value.

    """
    return round((omax - omin) * (ival - imin) / (imax - imin) + omin, 2)