def invertbtilde(self,nx): ''' Get inverse of the transformation for btilde to get back b in the original space. ''' btilde = nx[:,self.split:] b = applyAffine(invAffine(self.gb),btilde) return(btilde,b)
def inv(self,nx): ''' Inverse map, if the map has not been defined via the ellipse reflection then it will be. ''' btilde,b = self.invertbtilde(nx) atilde = nx[:,:self.split] ashift = self.f(btilde) a = applyAffine(invAffine(self.ga),atilde-ashift) tx = hstack([a,b]) return(tx)