code: def Rz_to_lambdanu_jac(R,z,Delta=1.):
      
      discr =           (R**2 + z**2 - Delta**2)**2 + (4. * Delta**2 * R**2)
      dldR  = R * (1. + (R**2 + z**2 + Delta**2) / nu.sqrt(discr))
      dndR  = R * (1. - (R**2 + z**2 + Delta**2) / nu.sqrt(discr))
      dldz  = z * (1. + (R**2 + z**2 - Delta**2) / nu.sqrt(discr))
      dndz  = z * (1. - (R**2 + z**2 - Delta**2) / nu.sqrt(discr))
      dim = 1
      if   isinstance(R,nu.ndarray): dim = len(R)
      elif isinstance(z,nu.ndarray): dim = len(z)
      jac      = nu.zeros((2,2,dim))
      jac[0,0,:] = dldR
      jac[0,1,:] = dldz
      jac[1,0,:] = dndR
      jac[1,1,:] = dndz
      if dim == 1: return jac[:,:,0]
      else:        return jac
docs: NAME:
  
         Rz_to_lambdanu_jac
  
      PURPOSE:
  
         calculate the Jacobian of the cylindrical (R,z) to prolate spheroidal
         (lambda,nu) conversion
  
      INPUT:
  
          R     - Galactocentric cylindrical radius
          z     - vertical height
          Delta - focal distance that defines the spheroidal coordinate system (default: 1.)
                  Delta=sqrt(g-a)
  
      OUTPUT:
  
         jacobian d((lambda,nu))/d((R,z))
  
      HISTORY:
  
         2015-02-13 - Written - Trick (MPIA)