@@ -56,21 +56,21 @@ def correlate(apr: APR,
5656 ----------
5757 apr: APR
5858 Input APR object
59- parts: ShortParticles, FloatParticles
59+ parts: ByteParticles, ShortParticles, FloatParticles or LongParticles
6060 Input particle values
6161 stencil: np.ndarray
6262 Stencil or kernel to correlate with the image. Should be 3-dimensional and of type float32, otherwise
63- it is expanded, e.g. shape (3, 3) -> (1, 3, 3), and cast .
63+ it is converted and expanded, e.g. shape (3, 3) -> (1, 3, 3).
6464 output: FloatParticles, optional
65- (optional) Particle object to which the resulting values are written. If not provided, a new object
65+ Particle object to which the resulting values are written. If not provided, a new object
6666 is generated (default: None)
6767 restrict_stencil: bool
6868 If True, the stencil is adapted to coarser resolution levels such that the correlation is consistent with
6969 applying ``stencil`` to the reconstructed pixel image. (default: True)
7070 rescale_stencil: bool
7171 If True, the stencil is adapted to coarser resolution levels by rescaling the weights according to
72- the distance between particles. Useful for, e.g., finite difference calculations. If both `rescale_stencil`
73- and `restrict_stencil` are True, rescaling is used. (default: False)
72+ the distance between particles. Useful for, e.g., finite difference calculations. If both `` rescale_stencil` `
73+ and `` restrict_stencil` ` are True, rescaling is used. (default: False)
7474 normalize_stencil: bool
7575 If True, the stencil is normalized to sum to 1 (if ``restrict_stencil`` is True, the stencil is normalized
7676 at each resolution level. (default: True)
@@ -79,9 +79,9 @@ def correlate(apr: APR,
7979 method: str
8080 Method used to apply the operation:
8181
82- - 'pencil': construct isotropic neighborhoods of shape (stencil.shape[0], stencil.shape[1], apr.shape[2])
83- - 'slice': construct isotropic neighborhoods of shape (stencil.shape[0], apr.shape[1], apr.shape[2])
84- - 'cuda': compute the correlation using the GPU. Requires the package to be built with CUDA support,
82+ - `` 'pencil'`` : construct isotropic neighborhoods of shape (stencil.shape[0], stencil.shape[1], apr.shape[2])
83+ - `` 'slice'`` : construct isotropic neighborhoods of shape (stencil.shape[0], apr.shape[1], apr.shape[2])
84+ - `` 'cuda'`` : compute the correlation using the GPU. Requires the package to be built with CUDA support,
8585 and ``stencil`` to have shape (3, 3, 3) or (5, 5, 5).
8686
8787 The methods may differ in performance, depending on the input data, but produce the same result. (default: 'pencil')
@@ -128,21 +128,21 @@ def convolve(apr: APR,
128128 ----------
129129 apr: APR
130130 Input APR object
131- parts: ShortParticles, FloatParticles
131+ parts: ByteParticles, ShortParticles, FloatParticles or LongParticles
132132 Input particle values
133133 stencil: np.ndarray
134134 Stencil or kernel to convolve with the image. Should be 3-dimensional and of type float32, otherwise
135- it is expanded, e.g. shape (3, 3) -> (1, 3, 3), and cast .
135+ it is converted and expanded, e.g. shape (3, 3) -> (1, 3, 3).
136136 output: FloatParticles, optional
137- (optional) Particle object to which the resulting values are written. If not provided, a new object
137+ Particle object to which the resulting values are written. If not provided, a new object
138138 is generated (default: None)
139139 restrict_stencil: bool
140140 If True, the stencil is adapted to coarser resolution levels such that the convolution is consistent with
141141 applying ``stencil`` to the reconstructed pixel image. (default: True)
142142 rescale_stencil: bool
143143 If True, the stencil is adapted to coarser resolution levels by rescaling the weights according to
144- the distance between particles. Useful for, e.g., finite difference calculations. If both `rescale_stencil`
145- and `restrict_stencil` are True, rescaling is used. (default: False)
144+ the distance between particles. Useful for, e.g., finite difference calculations. If both `` rescale_stencil` `
145+ and `` restrict_stencil` ` are True, rescaling is used. (default: False)
146146 normalize_stencil: bool
147147 If True, the stencil is normalized to sum to 1 (if ``restrict_stencil`` is True, the stencil is normalized
148148 at each resolution level. (default: True)
@@ -151,9 +151,9 @@ def convolve(apr: APR,
151151 method: str
152152 Method used to apply the operation:
153153
154- - 'pencil': construct isotropic neighborhoods of shape (stencil.shape[0], stencil.shape[1], apr.shape[2])
155- - 'slice': construct isotropic neighborhoods of shape (stencil.shape[0], apr.shape[1], apr.shape[2])
156- - 'cuda': compute the convolution using the GPU. Requires the package to be built with CUDA support,
154+ - `` 'pencil'`` : construct isotropic neighborhoods of shape (stencil.shape[0], stencil.shape[1], apr.shape[2])
155+ - `` 'slice'`` : construct isotropic neighborhoods of shape (stencil.shape[0], apr.shape[1], apr.shape[2])
156+ - `` 'cuda'`` : compute the convolution using the GPU. Requires the package to be built with CUDA support,
157157 and ``stencil`` to have shape (3, 3, 3) or (5, 5, 5).
158158
159159 The methods may differ in performance, depending on the input data, but produce the same result. (default: 'pencil')
0 commit comments