'The robust criterion function for Andrew\'s wave.
Parameters
z : array-like
1d array
Returns
rho : array
rho(z) = a*(1-cos(z/a))     for \|z\| <= a*pi
rho(z) = 2*a                for \|z\| > a*pi'

def rho(self, z):

    a = self.a
    z = np.asarray(z)
    test = self._subset(z)
    return (((test * a) * (1 - np.cos((z / a)))) + (((1 - test) * 2) * a))
