def hum_ratio_from_p_w_and_p(p_w, p):
    """
    Calculate humidity ratio from water vapor pressure and atmospheric pressure
    Eq(22) in "CHAPTER 6 - PSYCHROMETRICS" in "2001 ASHRAE Fundamentals Handbook (SI)"

    :param p_w: water vapor pressure [Pa]
    :type p_w: double
    :param p: atmospheric pressure [Pa]
    :type p: double
    :return: humidity ratio [g / kg dry air]
    :rtype: double
    """

    return 0.62198 * p_w/(p-p_w)