@classmethod
def compute_p(cls, coeffs, x, y, z):
    """
        This method computes sample and line numerator and denominators from their respective coefficients
        :param coeffs: coefficients for line/sample numerator/denominator to be calculated
        :param x: normalized latitudes, calculated by (lats - lat_off)/lat_scale
        :param y: normalized longitudes, calculated by (lons - lon_off)/lon_scale
        :param z: normalized altitudes, calculated by (alts - height_off)/height_scale
        :return: the numerator or denominator for line or sample to be calculated given the provided coefficients
        """
    a1 = coeffs[0]
    a2 = coeffs[1]
    a3 = coeffs[2]
    a4 = coeffs[3]
    a5 = coeffs[4]
    a6 = coeffs[5]
    a7 = coeffs[6]
    a8 = coeffs[7]
    a9 = coeffs[8]
    a10 = coeffs[9]
    a11 = coeffs[10]
    a12 = coeffs[11]
    a13 = coeffs[12]
    a14 = coeffs[13]
    a15 = coeffs[14]
    a16 = coeffs[15]
    a17 = coeffs[16]
    a18 = coeffs[17]
    a19 = coeffs[18]
    a20 = coeffs[19]
    x_squared = x * x
    y_squared = y * y
    z_squared = z * z
    x_cubed = x_squared * x
    y_cubed = y_squared * y
    z_cubed = z_squared * z
    xy = x * y
    xz = x * z
    yz = y * z
    p = (a1 + a2 * y + a3 * x + a4 * z + a5 * xy + a6 * yz + a7 * xz + a8 *
        y_squared + a9 * x_squared + a10 * z_squared + a11 * x * y * z + 
        a12 * y_cubed + a13 * y * x_squared + a14 * y * z_squared + a15 *
        y_squared * x + a16 * x_cubed + a17 * x * z_squared + a18 *
        y_squared * z + a19 * x_squared * y + a20 * z_cubed)
    return p
