def get_distance_term(self, C, rrup):
        """
        Returns the distance scaling term in equation 7
        """
        f_p = C["c1"] * rrup
        idx = np.logical_and(rrup > self.CONSTANTS["r1"],
                             rrup <= self.CONSTANTS["r2"])
        f_p[idx] = (C["c1"] * self.CONSTANTS["r1"]) +\
            C["c2"] * (rrup[idx] - self.CONSTANTS["r1"])
        idx = rrup > self.CONSTANTS["r2"]
        f_p[idx] = C["c1"] * self.CONSTANTS["r1"] +\
            C["c2"] * (self.CONSTANTS["r2"] - self.CONSTANTS["r1"]) +\
            C["c3"] * (rrup[idx] - self.CONSTANTS["r2"])
        return f_p
def get_distance_term ( self , C , rrup ) : f_p = C [ "c1" ] * rrup idx = np . logical_and ( rrup > self . CONSTANTS [ "r1" ] , rrup <= self . CONSTANTS [ "r2" ] ) f_p [ idx ] = ( C [ "c1" ] * self . CONSTANTS [ "r1" ] ) + C [ "c2" ] * ( rrup [ idx ] - self . CONSTANTS [ "r1" ] ) idx = rrup > self . CONSTANTS [ "r2" ] f_p [ idx ] = C [ "c1" ] * self . CONSTANTS [ "r1" ] + C [ "c2" ] * ( self . CONSTANTS [ "r2" ] - self . CONSTANTS [ "r1" ] ) + C [ "c3" ] * ( rrup [ idx ] - self . CONSTANTS [ "r2" ] ) return f_p
Returns the distance scaling term in equation 7