def _compute_f1(self, C, mag, rrup):
        """
        Compute f1 term (eq.4, page 105)
        """
        r = np.sqrt(rrup ** 2 + C['c4'] ** 2)

        f1 = (
            C['a1'] +
            C['a12'] * (8.5 - mag) ** C['n'] +
            (C['a3'] + C['a13'] * (mag - C['c1'])) * np.log(r)
        )

        if mag <= C['c1']:
            f1 += C['a2'] * (mag - C['c1'])
        else:
            f1 += C['a4'] * (mag - C['c1'])

        return f1
def _compute_f1 ( self , C , mag , rrup ) : r = np . sqrt ( rrup ** 2 + C [ 'c4' ] ** 2 ) f1 = ( C [ 'a1' ] + C [ 'a12' ] * ( 8.5 - mag ) ** C [ 'n' ] + ( C [ 'a3' ] + C [ 'a13' ] * ( mag - C [ 'c1' ] ) ) * np . log ( r ) ) if mag <= C [ 'c1' ] : f1 += C [ 'a2' ] * ( mag - C [ 'c1' ] ) else : f1 += C [ 'a4' ] * ( mag - C [ 'c1' ] ) return f1
Compute f1 term (eq.4, page 105)