def getInverse(self, s): """ returns the value of the inverse of the mapping for s """ # self.logger.info("m0:"+str(log(s[0]**2+s[1]**2)/2)) return (log(s[0]**2 + s[1]**2) / 2 - self.Mr) * [1., 0] + (atan2(s[1], s[0]) - self.Mi) * [0, 1.]
def __init__(self, V_prior, Q_prior): """ initializes the mapping :param V_prior: a-priori p-wave velocity :param Q_prior: a-priori Q-index (must be positive) """ over2Q = 1.0 / (2 * Q_prior) # sigma_prior=1/(V_prior*(1-I*over2Q))**2 = 1/( V_prior * (1+over2Q**2)) **2 * ( (1-over2Q**2) + I * 2* over2Q ) self.Mr = log(sqrt((1 - over2Q ** 2) ** 2 + (2 * over2Q) ** 2) / (V_prior * (1 + over2Q ** 2)) ** 2) self.Mi = atan2(2 * over2Q, 1 - over2Q ** 2)
def __init__(self, V_prior, Q_prior): """ initializes the mapping :param V_prior: a-priori p-wave velocity :param Q_prior: a-priori Q-index (must be positive) """ over2Q = 1. / (2 * Q_prior) # sigma_prior=1/(V_prior*(1-I*over2Q))**2 = 1/( V_prior * (1+over2Q**2)) **2 * ( (1-over2Q**2) + I * 2* over2Q ) self.Mr = log( sqrt((1 - over2Q**2)**2 + (2 * over2Q)**2) / (V_prior * (1 + over2Q**2))**2) self.Mi = atan2(2 * over2Q, 1 - over2Q**2)
def getInverse(self, s): """ returns the value of the inverse of the mapping for s """ # self.logger.info("m0:"+str(log(s[0]**2+s[1]**2)/2)) return (log(s[0] ** 2 + s[1] ** 2) / 2 - self.Mr) * [1.0, 0] + (atan2(s[1], s[0]) - self.Mi) * [0, 1.0]