(nside, pol=False, lmax=None)
Return the pixel window function for the given nside.

    Parameters
    ----------
    nside : int
      The nside for which to return the pixel window function
    pol : bool, optional
      If True, return also the polar pixel window. Default: False
    lmax : int, optional
        Maximum l of the power spectrum (default: 3*nside-1)

    Returns
    -------
    pw or pwT,pwP : array or tuple of 2 arrays
      The temperature pixel window function, or a tuple with both
      temperature and polarisation pixel window functions.
Return the pixel window function for the given nside.
Return the pixel window function for the given nside .
def pixwin(nside, pol=False, lmax=None):
    """Return the pixel window function for the given nside.

    Parameters
    ----------
    nside : int
      The nside for which to return the pixel window function
    pol : bool, optional
      If True, return also the polar pixel window. Default: False
    lmax : int, optional
        Maximum l of the power spectrum (default: 3*nside-1)

    Returns
    -------
    pw or pwT,pwP : array or tuple of 2 arrays
      The temperature pixel window function, or a tuple with both
      temperature and polarisation pixel window functions.
    """

    if lmax is None:
        lmax = 3 * nside - 1

    datapath = DATAPATH
    if not pixelfunc.isnsideok(nside):
        raise ValueError("Wrong nside value (must be a power of two).")
    fname = os.path.join(datapath, "pixel_window_n%04d.fits" % nside)
    if not os.path.isfile(fname):
        raise ValueError("No pixel window for this nside " "or data files missing")
    # return hfitslib._pixwin(nside,datapath,pol)  ## BROKEN -> seg fault...
    pw = pf.getdata(fname)
    pw_temp, pw_pol = pw.field(0), pw.field(1)
    if pol:
        return pw_temp[: lmax + 1], pw_pol[: lmax + 1]
    else:
        return pw_temp[: lmax + 1]
def pixwin ( nside , pol = False , lmax = None ) : if lmax is None : lmax = 3 * nside - 1 datapath = DATAPATH if not pixelfunc . isnsideok ( nside ) : raise ValueError ( "Wrong nside value (must be a power of two)." ) fname = os . path . join ( datapath , "pixel_window_n%04d.fits" % nside ) if not os . path . isfile ( fname ) : raise ValueError ( "No pixel window for this nside " "or data files missing" ) # return hfitslib._pixwin(nside,datapath,pol)  ## BROKEN -> seg fault... pw = pf . getdata ( fname ) pw_temp , pw_pol = pw . field ( 0 ) , pw . field ( 1 ) if pol : return pw_temp [ : lmax + 1 ] , pw_pol [ : lmax + 1 ] else : return pw_temp [ : lmax + 1 ]