code: def from_cap(cls, theta, lmax, clat=None, clon=None, nmax=None,
                   theta_degrees=True, coord_degrees=True, dj_matrix=None):
          
          if theta_degrees:
              tapers, eigenvalues, taper_order = _shtools.SHReturnTapers(
                  _np.radians(theta), lmax)
          else:
              tapers, eigenvalues, taper_order = _shtools.SHReturnTapers(
                  theta, lmax)
  
          return SlepianCap(theta, tapers, eigenvalues, taper_order, clat, clon,
                            nmax, theta_degrees, coord_degrees, dj_matrix,
                            copy=False)
docs: Construct spherical cap Slepian functions.
  
          Usage
          -----
          x = Slepian.from_cap(theta, lmax, [clat, clon, nmax, theta_degrees,
                                             coord_degrees, dj_matrix])
  
          Returns
          -------
          x : Slepian class instance
  
          Parameters
          ----------
          theta : float
              Angular radius of the spherical-cap localization domain (default
              in degrees).
          lmax : int
              Spherical harmonic bandwidth of the Slepian functions.
          clat, clon : float, optional, default = None
              Latitude and longitude of the center of the rotated spherical-cap
              Slepian functions (default in degrees).
          nmax : int, optional, default (lmax+1)**2
              Number of Slepian functions to compute.
          theta_degrees : bool, optional, default = True
              True if theta is in degrees.
          coord_degrees : bool, optional, default = True
              True if clat and clon are in degrees.
          dj_matrix : ndarray, optional, default = None
              The djpi2 rotation matrix computed by a call to djpi2.