pystella/fourier/projectors.py
def transverse_traceless(self, queue, hij, hij_TT=None):
        """
        Projects a tensor field to be transverse and traceless.

        :arg queue: A :class:`pyopencl.CommandQueue`.

        :arg hij: The array containing the
            momentum-space tensor field to be projected.
            Must have shape ``(6,)+k_shape``, where
            ``k_shape`` is the shape of a single momentum-space field array.

        :arg hij_TT: The array in wihch the resulting projected
            tensor field will be stored.
            Must have the same shape as ``hij``.
            Defaults to *None*, in which case the projection is performed in-place.

        :returns: The :class:`pyopencl.Event` associated with the kernel invocation.
        """

        if hij_TT is None:
            hij_TT = hij
        evt, _ = self.tt_knl(queue, hij=hij, hij_TT=hij_TT, **self.eff_mom)
        return evt

        Projects a tensor field to be transverse and traceless.

        :arg queue: A :class:`pyopencl.CommandQueue`.

        :arg hij: The array containing the
            momentum-space tensor field to be projected.
            Must have shape ``(6,)+k_shape``, where
            ``k_shape`` is the shape of a single momentum-space field array.

        :arg hij_TT: The array in wihch the resulting projected
            tensor field will be stored.
            Must have the same shape as ``hij``.
            Defaults to *None*, in which case the projection is performed in-place.

        :returns: The :class:`pyopencl.Event` associated with the kernel invocation.
        
Projects a tensor field to be transverse and traceless.
Projects a tensor field to be transverse and traceless .
def transverse_traceless(self, queue, hij, hij_TT=None):
        if hij_TT is None:
            hij_TT = hij
        evt, _ = self.tt_knl(queue, hij=hij, hij_TT=hij_TT, **self.eff_mom)
        return evt
def transverse_traceless ( self , queue , hij , hij_TT = None ) : if hij_TT is None : hij_TT = hij evt , _ = self . tt_knl ( queue , hij = hij , hij_TT = hij_TT , ** self . eff_mom ) return evt
Projects a tensor field to be transverse and traceless.
Projects a tensor field to be transverse and traceless .
"""
        Projects a tensor field to be transverse and traceless.

        :arg queue: A :class:`pyopencl.CommandQueue`.

        :arg hij: The array containing the
            momentum-space tensor field to be projected.
            Must have shape ``(6,)+k_shape``, where
            ``k_shape`` is the shape of a single momentum-space field array.

        :arg hij_TT: The array in wihch the resulting projected
            tensor field will be stored.
            Must have the same shape as ``hij``.
            Defaults to *None*, in which case the projection is performed in-place.

        :returns: The :class:`pyopencl.Event` associated with the kernel invocation.
        """
The :class:`pyopencl.Event` associated with the kernel invocation.
The : class : ` pyopencl . Event ` associated with the kernel invocation .
self
queue
None
hij
The array containing the
momentum-space tensor field to be projected.
Must have shape ``(6,)+k_shape``, where
``k_shape`` is the shape of a single momentum-space field array.
The array containing the momentum - space tensor field to be projected . Must have shape ` ` ( 6 ) + k_shape ` ` where ` ` k_shape ` ` is the shape of a single momentum - space field array .
hij_TT
The array in wihch the resulting projected
tensor field will be stored.
Must have the same shape as ``hij``.
Defaults to *None*, in which case the projection is performed in-place.
The array in wihch the resulting projected tensor field will be stored . Must have the same shape as ` ` hij ` ` . Defaults to * None * in which case the projection is performed in - place .